]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actiondimaligned.cpp
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / actions / actiondimaligned.cpp
index 537067093130cd1a349549308863a7b4baf8ba66..cd3007639dc1ab645712b3593ae53a6b3a130bd5 100644 (file)
@@ -24,7 +24,7 @@
 #include "preview.h"
 #include "snapper.h"
 
-ActionDimAligned::ActionDimAligned(RS_EntityContainer & container, GraphicView & graphicView): ActionDimension("Draw aligned dimensions",
+ActionDimAligned::ActionDimAligned(EntityContainer & container, GraphicView & graphicView): ActionDimension("Draw aligned dimensions",
                container, graphicView)
 {
        reset();
@@ -42,11 +42,11 @@ ActionDimAligned::~ActionDimAligned()
 void ActionDimAligned::reset()
 {
        ActionDimension::reset();
-       edata = RS_DimAlignedData(Vector(false), Vector(false));
+       edata = DimAlignedData(Vector(false), Vector(false));
        lastStatus = SetExtPoint1;
 
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestOptions(this, true, true);
 }
 
 void ActionDimAligned::trigger()
@@ -56,7 +56,7 @@ void ActionDimAligned::trigger()
        graphicView->moveRelativeZero(data.definitionPoint);
 
        //data.text = getText();
-       RS_DimAligned * dim = new RS_DimAligned(container, data, edata);
+       DimAligned * dim = new DimAligned(container, data, edata);
        dim->setLayerToActive();
        dim->setPenToActive();
        dim->update();
@@ -77,21 +77,21 @@ void ActionDimAligned::trigger()
        graphicView->moveRelativeZero(rz);
        drawSnapper();
 
-       RS_DEBUG->print("ActionDimAligned::trigger(): dim added: %d", dim->getId());
+       DEBUG->print("ActionDimAligned::trigger(): dim added: %d", dim->getId());
 }
 
 void ActionDimAligned::preparePreview()
 {
        Vector dirV;
        dirV.setPolar(100.0, edata.extensionPoint1.angleTo(edata.extensionPoint2) + M_PI / 2.0);
-       RS_ConstructionLine cl(NULL, RS_ConstructionLineData(edata.extensionPoint2,
+       ConstructionLine cl(NULL, ConstructionLineData(edata.extensionPoint2,
                edata.extensionPoint2 + dirV));
        data.definitionPoint = cl.getNearestPointOnEntity(data.definitionPoint);
 }
 
 void ActionDimAligned::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDimAligned::mouseMoveEvent begin");
+       DEBUG->print("ActionDimAligned::mouseMoveEvent begin");
        Vector mouse = snapPoint(e);
 
        switch (getStatus())
@@ -105,7 +105,7 @@ void ActionDimAligned::mouseMoveEvent(QMouseEvent * e)
                {
                        deletePreview();
                        clearPreview();
-//                     preview->addEntity(new RS_Line(preview, RS_LineData(edata.extensionPoint1, mouse)));
+//                     preview->addEntity(new Line(preview, LineData(edata.extensionPoint1, mouse)));
                        drawPreview();
                }
                break;
@@ -121,7 +121,7 @@ void ActionDimAligned::mouseMoveEvent(QMouseEvent * e)
                        preparePreview();
 
                        //data.text = getText();
-//                     RS_DimAligned * dim = new RS_DimAligned(preview, data, edata);
+//                     DimAligned * dim = new DimAligned(preview, data, edata);
 //                     dim->update();
 //                     preview->addEntity(dim);
                        drawPreview();
@@ -132,7 +132,7 @@ void ActionDimAligned::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDimAligned::mouseMoveEvent end");
+       DEBUG->print("ActionDimAligned::mouseMoveEvent end");
 }
 
 void ActionDimAligned::mouseReleaseEvent(QMouseEvent * e)
@@ -185,14 +185,14 @@ void ActionDimAligned::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDimAligned::commandEvent(RS_CommandEvent * e)
+void ActionDimAligned::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
 
                return;
@@ -203,8 +203,8 @@ void ActionDimAligned::commandEvent(RS_CommandEvent * e)
        case SetText:
                setText(c);
 
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->requestOptions(this, true, true);
 
                setStatus(lastStatus);
                graphicView->enableCoordinateInput();
@@ -243,28 +243,28 @@ QStringList ActionDimAligned::getAvailableCommands()
 
 void ActionDimAligned::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                case SetExtPoint1:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first extension line origin"), tr("Cancel"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify first extension line origin"), tr("Cancel"));
                        break;
 
                case SetExtPoint2:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second extension line origin"), tr("Back"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify second extension line origin"), tr("Back"));
                        break;
 
                case SetDefPoint:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify dimension line location"), tr("Back"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify dimension line location"), tr("Back"));
                        break;
 
                case SetText:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), "");
+                       DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), "");
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -272,8 +272,8 @@ void ActionDimAligned::updateMouseButtonHints()
 
 void ActionDimAligned::hideOptions()
 {
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestOptions(this, false);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestOptions(this, false);
 
        ActionDimension::hideOptions();
 }
@@ -282,7 +282,7 @@ void ActionDimAligned::showOptions()
 {
        ActionDimension::showOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestOptions(this, true);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestOptions(this, true);
 }