]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actiondrawlinerelangle.cpp
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / actions / actiondrawlinerelangle.cpp
index 6d3c2f6ac58540727af909848f001865aff5a616..260adc374dc1b2312021b16ff6cc39f46fe9789f 100644 (file)
@@ -23,7 +23,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawLineRelAngle::ActionDrawLineRelAngle(RS_EntityContainer & container,
+ActionDrawLineRelAngle::ActionDrawLineRelAngle(EntityContainer & container,
        GraphicView & graphicView, double angle, bool fixedAngle):
        ActionInterface("Draw Lines with relative angles", container, graphicView)
 {
@@ -51,13 +51,13 @@ void ActionDrawLineRelAngle::trigger()
        deletePreview();
        clearPreview();
 
-       RS_Creation creation(container, graphicView);
+       Creation creation(container, graphicView);
        creation.createLineRelAngle(pos, entity, angle, length);
 }
 
 void ActionDrawLineRelAngle::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawLineRelAngle::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawLineRelAngle::mouseMoveEvent begin");
        Vector mouse(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
 
        switch (getStatus())
@@ -73,7 +73,7 @@ void ActionDrawLineRelAngle::mouseMoveEvent(QMouseEvent * e)
                deletePreview();
                clearPreview();
 
-//             RS_Creation creation(preview, NULL, false);
+//             Creation creation(preview, NULL, false);
 //             creation.createLineRelAngle(pos, entity, angle, length);
 
                drawPreview();
@@ -84,7 +84,7 @@ void ActionDrawLineRelAngle::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDrawLineRelAngle::mouseMoveEvent end");
+       DEBUG->print("ActionDrawLineRelAngle::mouseMoveEvent end");
 }
 
 void ActionDrawLineRelAngle::mouseReleaseEvent(QMouseEvent * e)
@@ -95,7 +95,7 @@ void ActionDrawLineRelAngle::mouseReleaseEvent(QMouseEvent * e)
                {
                case SetEntity:
                {
-                       RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+                       Entity * en = catchEntity(e, RS2::ResolveAll);
 
                        if (en != NULL
                            && (en->rtti() == RS2::EntityLine
@@ -156,14 +156,14 @@ void ActionDrawLineRelAngle::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDrawLineRelAngle::commandEvent(RS_CommandEvent * e)
+void ActionDrawLineRelAngle::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;
        }
@@ -191,15 +191,15 @@ void ActionDrawLineRelAngle::commandEvent(RS_CommandEvent * e)
        case SetAngle:
        {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok)
-                       angle = RS_Math::deg2rad(a);
-               else if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       angle = Math::deg2rad(a);
+               else if (DIALOGFACTORY)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->requestOptions(this, true, true);
 
                setStatus(SetPos);
        }
@@ -208,15 +208,15 @@ void ActionDrawLineRelAngle::commandEvent(RS_CommandEvent * e)
        case SetLength:
        {
                bool ok;
-               double l = RS_Math::eval(c, &ok);
+               double l = Math::eval(c, &ok);
 
                if (ok)
                        length = l;
-               else if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               else if (DIALOGFACTORY)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->requestOptions(this, true, true);
 
                setStatus(SetPos);
        }
@@ -249,22 +249,22 @@ QStringList ActionDrawLineRelAngle::getAvailableCommands()
 
 void ActionDrawLineRelAngle::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY)
+       if (DIALOGFACTORY)
        {
                switch (getStatus())
                {
                case SetEntity:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Select base entity"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Select base entity"),
                                tr("Cancel"));
                        break;
 
                case SetPos:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify position"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify position"),
                                tr("Back"));
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -274,16 +274,16 @@ void ActionDrawLineRelAngle::showOptions()
 {
        ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, true);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionDrawLineRelAngle::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, false);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionDrawLineRelAngle::updateMouseCursor()
@@ -293,12 +293,12 @@ void ActionDrawLineRelAngle::updateMouseCursor()
 
 void ActionDrawLineRelAngle::updateToolBar()
 {
-       if (RS_DIALOGFACTORY)
+       if (DIALOGFACTORY)
        {
                if (!isFinished())
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                else
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
        }
 }