]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actiondrawlineparallel.cpp
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / actions / actiondrawlineparallel.cpp
index 2ca3285e4318f9e3077e0891fa081ee7b6971194..f8a473af7c8645f4d98bdcf6552ca3fe0a4433ef 100644 (file)
@@ -26,7 +26,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawLineParallel::ActionDrawLineParallel(RS_EntityContainer & container,
+ActionDrawLineParallel::ActionDrawLineParallel(EntityContainer & container,
        GraphicView & graphicView):
        ActionInterface("Draw Parallels", container, graphicView),
        parallel(NULL), distance(1.0), number(1), coord(Vector(false)), entity(NULL)
@@ -46,11 +46,11 @@ ActionDrawLineParallel::~ActionDrawLineParallel()
 void ActionDrawLineParallel::trigger()
 {
        ActionInterface::trigger();
-       RS_Creation creation(container, graphicView);
-       RS_Entity * e = creation.createParallel(coord, distance, number, entity);
+       Creation creation(container, graphicView);
+       Entity * e = creation.createParallel(coord, distance, number, entity);
 
        if (!e)
-               RS_DEBUG->print("ActionDrawLineParallel::trigger: No parallels added\n");
+               DEBUG->print("ActionDrawLineParallel::trigger: No parallels added\n");
 
        graphicView->preview.clear();
        graphicView->redraw();
@@ -58,7 +58,7 @@ void ActionDrawLineParallel::trigger()
 
 void ActionDrawLineParallel::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawLineParallel::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawLineParallel::mouseMoveEvent begin");
        coord = Vector(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
        entity = catchEntity(e, RS2::ResolveAll);
 
@@ -69,12 +69,12 @@ void ActionDrawLineParallel::mouseMoveEvent(QMouseEvent * e)
 #if 0
                deletePreview();
                clearPreview();
-               RS_Creation creation(preview, NULL, false);
+               Creation creation(preview, NULL, false);
                creation.createParallel(coord, distance, number, entity);
                drawPreview();
 #else
                graphicView->preview.clear();
-               RS_Creation creation(&(graphicView->preview), NULL, false);
+               Creation creation(&(graphicView->preview), NULL, false);
                creation.createParallel(coord, distance, number, entity);
                graphicView->redraw();
 #endif
@@ -85,7 +85,7 @@ void ActionDrawLineParallel::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDrawLineParallel::mouseMoveEvent end");
+       DEBUG->print("ActionDrawLineParallel::mouseMoveEvent end");
 }
 
 void ActionDrawLineParallel::mouseReleaseEvent(QMouseEvent * e)
@@ -98,23 +98,23 @@ void ActionDrawLineParallel::mouseReleaseEvent(QMouseEvent * e)
 
 void ActionDrawLineParallel::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY)
+       if (DIALOGFACTORY)
        {
                switch (getStatus())
                {
                case SetEntity:
-                       RS_DIALOGFACTORY->updateMouseWidget(
+                       DIALOGFACTORY->updateMouseWidget(
                                tr("Specify Distance <%1> or select entity or [%2]")
-                               .arg(distance).arg(RS_COMMANDS->command("through")),
+                               .arg(distance).arg(COMMANDS->command("through")),
                                tr("Cancel"));
                        break;
 
                case SetNumber:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Enter number:"), "");
+                       DIALOGFACTORY->updateMouseWidget(tr("Enter number:"), "");
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -124,8 +124,8 @@ void ActionDrawLineParallel::showOptions()
 {
        ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, true);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, true);
 
        updateMouseButtonHints();
 }
@@ -134,18 +134,18 @@ void ActionDrawLineParallel::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, false);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, false);
 }
 
-void ActionDrawLineParallel::commandEvent(RS_CommandEvent * e)
+void ActionDrawLineParallel::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
 
                return;
@@ -170,16 +170,16 @@ void ActionDrawLineParallel::commandEvent(RS_CommandEvent * e)
                else
                {
                        bool ok;
-                       double d = RS_Math::eval(c, &ok);
+                       double d = Math::eval(c, &ok);
 
                        if (ok && d > 1.0e-10)
                                distance = d;
-                       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 != NULL)
-                               RS_DIALOGFACTORY->requestOptions(this, true, true);
+                       if (DIALOGFACTORY != NULL)
+                               DIALOGFACTORY->requestOptions(this, true, true);
 
                        updateMouseButtonHints();
                        //setStatus(SetEntity);
@@ -196,14 +196,14 @@ void ActionDrawLineParallel::commandEvent(RS_CommandEvent * e)
                {
                        if (n > 0 && n < 100)
                                number = n;
-                       else if (RS_DIALOGFACTORY)
-                               RS_DIALOGFACTORY->commandMessage(tr("Not a valid number. Try 1..99"));
+                       else if (DIALOGFACTORY)
+                               DIALOGFACTORY->commandMessage(tr("Not a valid number. Try 1..99"));
                }
-               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(SetEntity);
        }
@@ -239,8 +239,8 @@ void ActionDrawLineParallel::updateMouseCursor()
 
 void ActionDrawLineParallel::updateToolBar()
 {
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
 
 double ActionDrawLineParallel::getDistance()