]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actiondrawlinebisector.cpp
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / actions / actiondrawlinebisector.cpp
index e4c8bdd94bf27d40c2f9e3d22f405567c6e40c86..eb7172715d8e1e1b793e434c8a42b8281bed76ea 100644 (file)
@@ -23,7 +23,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawLineBisector::ActionDrawLineBisector(RS_EntityContainer & container,
+ActionDrawLineBisector::ActionDrawLineBisector(EntityContainer & container,
        GraphicView & graphicView):
        ActionInterface("Draw Bisectors", container, graphicView),
        bisector(NULL), line1(NULL), line2(NULL), length(10.0), number(1),
@@ -44,14 +44,14 @@ ActionDrawLineBisector::~ActionDrawLineBisector()
 void ActionDrawLineBisector::trigger()
 {
        ActionInterface::trigger();
-       RS_Creation creation(container, graphicView);
+       Creation creation(container, graphicView);
        creation.createBisector(coord1, coord2, length, number, line1, line2);
        graphicView->redraw();
 }
 
 void ActionDrawLineBisector::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawLineBisector::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawLineBisector::mouseMoveEvent begin");
 
        Vector mouse = Vector(graphicView->toGraphX(e->x()),
                graphicView->toGraphY(e->y()));
@@ -64,13 +64,13 @@ void ActionDrawLineBisector::mouseMoveEvent(QMouseEvent * e)
        case SetLine2:
        {
                coord2 = mouse;
-               RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+               Entity * en = catchEntity(e, RS2::ResolveAll);
 
                if (en && en->rtti() == RS2::EntityLine)
                {
-                       line2 = (RS_Line *)en;
+                       line2 = (Line *)en;
                        graphicView->preview.clear();
-                       RS_Creation creation(&(graphicView->preview), NULL, false);
+                       Creation creation(&(graphicView->preview), NULL, false);
                        creation.createBisector(coord1, coord2, length, number, line1, line2);
                }
        }
@@ -81,7 +81,7 @@ void ActionDrawLineBisector::mouseMoveEvent(QMouseEvent * e)
        }
 
        graphicView->redraw();
-       RS_DEBUG->print("ActionDrawLineBisector::mouseMoveEvent end");
+       DEBUG->print("ActionDrawLineBisector::mouseMoveEvent end");
 }
 
 void ActionDrawLineBisector::mouseReleaseEvent(QMouseEvent * e)
@@ -102,11 +102,11 @@ void ActionDrawLineBisector::mouseReleaseEvent(QMouseEvent * e)
                case SetLine1:
                {
                        coord1 = mouse;
-                       RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+                       Entity * en = catchEntity(e, RS2::ResolveAll);
 
                        if (en && en->rtti() == RS2::EntityLine)
                        {
-                               line1 = (RS_Line *)en;
+                               line1 = (Line *)en;
                                setStatus(SetLine2);
                        }
                }
@@ -121,13 +121,13 @@ void ActionDrawLineBisector::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void ActionDrawLineBisector::commandEvent(RS_CommandEvent * e)
+void ActionDrawLineBisector::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -158,14 +158,14 @@ void ActionDrawLineBisector::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
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
                break;
@@ -173,14 +173,14 @@ void ActionDrawLineBisector::commandEvent(RS_CommandEvent * e)
        case SetNumber:
        {
                bool ok;
-               int n = (int)RS_Math::eval(c, &ok);
+               int n = (int)Math::eval(c, &ok);
 
                if (ok)
                        number = n;
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
                break;
@@ -214,23 +214,23 @@ void ActionDrawLineBisector::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetLine1:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Select first line"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Select first line"), tr("Cancel"));
                break;
 
        case SetLine2:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Select second line"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Select second line"), tr("Back"));
                break;
 
        case SetLength:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter bisector length:"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Enter bisector length:"), tr("Back"));
                break;
 
        case SetNumber:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter number of bisectors:"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Enter number of bisectors:"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -238,13 +238,13 @@ void ActionDrawLineBisector::updateMouseButtonHints()
 void ActionDrawLineBisector::showOptions()
 {
        ActionInterface::showOptions();
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionDrawLineBisector::hideOptions()
 {
        ActionInterface::hideOptions();
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionDrawLineBisector::updateMouseCursor()
@@ -254,7 +254,7 @@ void ActionDrawLineBisector::updateMouseCursor()
 
 void ActionDrawLineBisector::updateToolBar()
 {
-       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+       DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
 
 void ActionDrawLineBisector::setLength(double l)