X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factioninfoangle.cpp;h=d7b69a0c1a28005499ced40192af052d010ceffb;hb=f62cebc26c7c3af447f0e4e4c43331f8589dce22;hp=d2bf0e6ec27d9d80dac820233815cd77ef60d0e9;hpb=d774c2655ba2c3657a565f325411144452392277;p=architektonas diff --git a/src/actions/actioninfoangle.cpp b/src/actions/actioninfoangle.cpp index d2bf0e6..d7b69a0 100644 --- a/src/actions/actioninfoangle.cpp +++ b/src/actions/actioninfoangle.cpp @@ -3,7 +3,9 @@ // Part of the Architektonas Project // Originally part of QCad Community Edition by Andrew Mustun // Extensively rewritten and refactored by James L. Hammons -// (C) 2010 Underground Software +// Portions copyright (C) 2001-2003 RibbonSoft +// Copyright (C) 2010 Underground Software +// See the README and GPLv2 files for licensing and warranty information // // JLH = James L. Hammons // @@ -14,11 +16,12 @@ #include "actioninfoangle.h" -#include "rs_dialogfactory.h" +#include "debug.h" +#include "dialogfactory.h" #include "graphicview.h" -#include "rs_information.h" +#include "information.h" -ActionInfoAngle::ActionInfoAngle(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Angle", +ActionInfoAngle::ActionInfoAngle(EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Angle", container, graphicView) { } @@ -34,12 +37,12 @@ void ActionInfoAngle::init(int status) void ActionInfoAngle::trigger() { - RS_DEBUG->print("ActionInfoAngle::trigger()"); + DEBUG->print("ActionInfoAngle::trigger()"); deleteSnapper(); if (entity1 != NULL && entity2 != NULL) { - VectorSolutions sol = RS_Information::getIntersection(entity1, entity2, false); + VectorSolutions sol = Information::getIntersection(entity1, entity2, false); if (sol.hasValid()) { @@ -52,18 +55,18 @@ void ActionInfoAngle::trigger() double angle = fabs(angle2 - angle1); QString str; - str.sprintf("%.6f", RS_Math::rad2deg(angle)); - RS_DIALOGFACTORY->commandMessage(tr("Angle: %1%2").arg(str).arg(QChar(0xB0))); + str.sprintf("%.6f", Math::rad2deg(angle)); + DIALOGFACTORY->commandMessage(tr("Angle: %1%2").arg(str).arg(QChar(0xB0))); } } else - RS_DIALOGFACTORY->commandMessage(tr("Lines are parallel")); + DIALOGFACTORY->commandMessage(tr("Lines are parallel")); } } void ActionInfoAngle::mouseMoveEvent(QMouseEvent * /*e*/) { - RS_DEBUG->print("ActionInfoAngle::mouseMoveEvent begin"); + DEBUG->print("ActionInfoAngle::mouseMoveEvent begin"); switch (getStatus()) { @@ -77,7 +80,7 @@ void ActionInfoAngle::mouseMoveEvent(QMouseEvent * /*e*/) break; } - RS_DEBUG->print("ActionInfoAngle::mouseMoveEvent end"); + DEBUG->print("ActionInfoAngle::mouseMoveEvent end"); } void ActionInfoAngle::mouseReleaseEvent(QMouseEvent * e) @@ -128,17 +131,17 @@ void ActionInfoAngle::updateMouseButtonHints() switch (getStatus()) { case SetEntity1: - RS_DIALOGFACTORY->updateMouseWidget( + DIALOGFACTORY->updateMouseWidget( tr("Specify first line"), tr("Cancel")); break; case SetEntity2: - RS_DIALOGFACTORY->updateMouseWidget( + DIALOGFACTORY->updateMouseWidget( tr("Specify second line"), tr("Back")); break; default: - RS_DIALOGFACTORY->updateMouseWidget("", ""); + DIALOGFACTORY->updateMouseWidget("", ""); break; } } @@ -154,11 +157,11 @@ void ActionInfoAngle::updateToolBar() { case SetEntity1: case SetEntity2: - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap); + DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap); break; default: - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo); + DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo); break; } }