]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actionmodifyround.cpp
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / actions / actionmodifyround.cpp
index 1ed1a79d90a299a15a0b96eb4b3d4e12d0f88fa6..38fd7c0dece20f981e3a66ae4ba3f0b1b17c7290 100644 (file)
@@ -22,7 +22,7 @@
 #include "information.h"
 #include "preview.h"
 
-ActionModifyRound::ActionModifyRound(RS_EntityContainer & container, GraphicView & graphicView):
+ActionModifyRound::ActionModifyRound(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Round Entities", container, graphicView)
 {
        entity1 = NULL;
@@ -50,16 +50,16 @@ void ActionModifyRound::init(int status)
 
 void ActionModifyRound::trigger()
 {
-       RS_DEBUG->print("ActionModifyRound::trigger()");
+       DEBUG->print("ActionModifyRound::trigger()");
 
        if (entity1 != NULL && entity1->isAtomic()
            && entity2 != NULL && entity2->isAtomic())
        {
                deletePreview();
 
-               RS_Modification m(*container, graphicView);
-               m.round(coord2, coord1, (RS_AtomicEntity *)entity1, coord2,
-                       (RS_AtomicEntity *)entity2, data);
+               Modification m(*container, graphicView);
+               m.round(coord2, coord1, (AtomicEntity *)entity1, coord2,
+                       (AtomicEntity *)entity2, data);
 
                coord1 = Vector(false);
                entity1 = NULL;
@@ -69,17 +69,17 @@ void ActionModifyRound::trigger()
 
                clearPreview();
 
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
        }
 }
 
 void ActionModifyRound::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionModifyRound::mouseMoveEvent begin");
+       DEBUG->print("ActionModifyRound::mouseMoveEvent begin");
 
        Vector mouse = graphicView->toGraph(e->x(), e->y());
-       RS_Entity * se = catchEntity(e, RS2::ResolveAll);
+       Entity * se = catchEntity(e, RS2::ResolveAll);
 
        switch (getStatus())
        {
@@ -93,12 +93,12 @@ void ActionModifyRound::mouseMoveEvent(QMouseEvent * e)
                coord2 = mouse;
 
                if (entity1 != NULL && entity2 != NULL && entity2->isAtomic()
-                   && RS_Information::isTrimmable(entity1, entity2))
+                   && Information::isTrimmable(entity1, entity2))
                {
                        deletePreview();
                        clearPreview();
-/*                     RS_Entity * tmp1 = entity1->clone();
-                       RS_Entity * tmp2 = entity2->clone();*/
+/*                     Entity * tmp1 = entity1->clone();
+                       Entity * tmp2 = entity2->clone();*/
 //                     tmp1->reparent(preview);
 //                     tmp2->reparent(preview);
 //                     preview->addEntity(tmp1);
@@ -106,9 +106,9 @@ void ActionModifyRound::mouseMoveEvent(QMouseEvent * e)
 
 /*                     bool trim = data.trim;
                        data.trim = false;
-                       RS_Modification m(*preview, NULL, false);
-                       m.round(coord2, coord1, (RS_AtomicEntity *)tmp1, coord2,
-                               (RS_AtomicEntity *)tmp2, data);
+                       Modification m(*preview, NULL, false);
+                       m.round(coord2, coord1, (AtomicEntity *)tmp1, coord2,
+                               (AtomicEntity *)tmp2, data);
                        data.trim = trim;
 
                        preview->removeEntity(tmp1);
@@ -121,13 +121,13 @@ void ActionModifyRound::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionModifyRound::mouseMoveEvent end");
+       DEBUG->print("ActionModifyRound::mouseMoveEvent end");
 }
 
 void ActionModifyRound::mouseReleaseEvent(QMouseEvent * e)
 {
        Vector mouse = graphicView->toGraph(e->x(), e->y());
-       RS_Entity * se = catchEntity(e, RS2::ResolveAll);
+       Entity * se = catchEntity(e, RS2::ResolveAll);
 
        if (e->button() == Qt::LeftButton)
        {
@@ -138,7 +138,7 @@ void ActionModifyRound::mouseReleaseEvent(QMouseEvent * e)
                        coord1 = mouse;
 
                        if (entity1 != NULL && entity1->isAtomic()
-                           && RS_Information::isTrimmable(entity1))
+                           && Information::isTrimmable(entity1))
                                setStatus(SetEntity2);
                        break;
 
@@ -147,7 +147,7 @@ void ActionModifyRound::mouseReleaseEvent(QMouseEvent * e)
                        coord2 = mouse;
 
                        if (entity2 != NULL && entity2->isAtomic()
-                           && RS_Information::isTrimmable(entity1, entity2))
+                           && Information::isTrimmable(entity1, entity2))
                                //setStatus(ChooseRounding);
                                trigger();
                        break;
@@ -164,14 +164,14 @@ void ActionModifyRound::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void ActionModifyRound::commandEvent(RS_CommandEvent * e)
+void ActionModifyRound::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;
        }
@@ -199,22 +199,22 @@ void ActionModifyRound::commandEvent(RS_CommandEvent * e)
                         */
                        data.trim = !data.trim;
 
-                       if (RS_DIALOGFACTORY != NULL)
-                               RS_DIALOGFACTORY->requestOptions(this, true, true);
+                       if (DIALOGFACTORY != NULL)
+                               DIALOGFACTORY->requestOptions(this, true, true);
                }
                break;
 
        case SetRadius: {
                bool ok;
-               double r = RS_Math::eval(c, &ok);
+               double r = Math::eval(c, &ok);
 
                if (ok == true)
                        data.radius = r;
-               else if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               else if (DIALOGFACTORY != NULL)
+                       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);
                setStatus(lastStatus);
        }
        break;
@@ -225,10 +225,10 @@ void ActionModifyRound::commandEvent(RS_CommandEvent * e)
           } else if (c==cmdNo.toLower() || c==cmdNo2) {
           data.trim = false;
                } else {
-                   RS_DIALOGFACTORY->commandMessage(tr("Please enter 'Yes' "
+                   DIALOGFACTORY->commandMessage(tr("Please enter 'Yes' "
               "or 'No'"));
                }
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
            }
            break;*/
@@ -260,45 +260,45 @@ void ActionModifyRound::showOptions()
 {
        ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestOptions(this, true);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionModifyRound::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestOptions(this, false);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionModifyRound::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                case SetEntity1:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first entity"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify first entity"),
                                tr("Back"));
                        break;
 
                case SetEntity2:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second entity"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify second entity"),
                                tr("Back"));
                        break;
 
                case SetRadius:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Enter radius:"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Enter radius:"),
                                tr("Cancel"));
                        break;
 
                /*case SetTrim:
-                   RS_DIALOGFACTORY->updateMouseWidget(tr("Trim on? (yes/no):"),
+                   DIALOGFACTORY->updateMouseWidget(tr("Trim on? (yes/no):"),
                                                        "");
                    break;*/
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -311,8 +311,8 @@ void ActionModifyRound::updateMouseCursor()
 
 void ActionModifyRound::updateToolBar()
 {
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
 }
 
 void ActionModifyRound::setRadius(double r)