]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actionmodifybevel.cpp
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / actions / actionmodifybevel.cpp
index 92042729df01492a7112a7c089952883e31d01fb..5615cf1e31edd8be336ea08e8ad2c3e048ab22fe 100644 (file)
@@ -21,7 +21,7 @@
 #include "dialogfactory.h"
 #include "information.h"
 
-ActionModifyBevel::ActionModifyBevel(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Bevel Entities",
+ActionModifyBevel::ActionModifyBevel(EntityContainer & container, GraphicView & graphicView): ActionInterface("Bevel Entities",
                container, graphicView)
 {
        entity1 = NULL;
@@ -49,28 +49,28 @@ void ActionModifyBevel::init(int status)
 
 void ActionModifyBevel::trigger()
 {
-       RS_DEBUG->print("ActionModifyBevel::trigger()");
+       DEBUG->print("ActionModifyBevel::trigger()");
 
        if (entity1 && entity1->isAtomic()
            && entity2 && entity2->isAtomic())
        {
-               RS_Modification m(*container, graphicView);
-               m.bevel(coord1, (RS_AtomicEntity *)entity1, coord2, (RS_AtomicEntity *)entity2, data);
+               Modification m(*container, graphicView);
+               m.bevel(coord1, (AtomicEntity *)entity1, coord2, (AtomicEntity *)entity2, data);
 
                entity1 = NULL;
                entity2 = NULL;
                setStatus(SetEntity1);
 
-               RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+               DIALOGFACTORY->updateSelectionWidget(container->countSelected());
        }
 }
 
 void ActionModifyBevel::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionModifyBevel::mouseMoveEvent begin");
+       DEBUG->print("ActionModifyBevel::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())
        {
@@ -81,7 +81,7 @@ void ActionModifyBevel::mouseMoveEvent(QMouseEvent * e)
 
        case SetEntity2:
 
-               if (entity1 != NULL && RS_Information::isTrimmable(entity1))
+               if (entity1 != NULL && Information::isTrimmable(entity1))
                {
                        coord2 = mouse;
                        entity2 = se;
@@ -92,7 +92,7 @@ void ActionModifyBevel::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionModifyBevel::mouseMoveEvent end");
+       DEBUG->print("ActionModifyBevel::mouseMoveEvent end");
 }
 
 void ActionModifyBevel::mouseReleaseEvent(QMouseEvent * e)
@@ -110,7 +110,7 @@ void ActionModifyBevel::mouseReleaseEvent(QMouseEvent * e)
                case SetEntity2:
 
                        if (entity2 != NULL && entity2->isAtomic()
-                           && RS_Information::isTrimmable(entity1, entity2))
+                           && Information::isTrimmable(entity1, entity2))
                                trigger();
                        break;
 
@@ -126,13 +126,13 @@ void ActionModifyBevel::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void ActionModifyBevel::commandEvent(RS_CommandEvent * e)
+void ActionModifyBevel::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -166,32 +166,32 @@ void ActionModifyBevel::commandEvent(RS_CommandEvent * e)
                        //lastStatus = (Status)getStatus();
                        //setStatus(SetTrim);
                        data.trim = !data.trim;
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+                       DIALOGFACTORY->requestOptions(this, true, true);
                }
                break;
 
        case SetLength1: {
                bool ok;
-               double l = RS_Math::eval(c, &ok);
+               double l = Math::eval(c, &ok);
 
                if (ok == true)
                        data.length1 = l;
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
 
        case SetLength2: {
                bool ok;
-               double l = RS_Math::eval(c, &ok);
+               double l = Math::eval(c, &ok);
 
                if (ok == true)
                        data.length2 = l;
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
@@ -202,10 +202,10 @@ void ActionModifyBevel::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;*/
@@ -238,14 +238,14 @@ void ActionModifyBevel::showOptions()
 {
        ActionInterface::showOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionModifyBevel::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionModifyBevel::updateMouseButtonHints()
@@ -253,31 +253,31 @@ void ActionModifyBevel::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetEntity1:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Select first entity"),
+               DIALOGFACTORY->updateMouseWidget(tr("Select first entity"),
                        tr("Cancel"));
                break;
 
        case SetEntity2:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Select second entity"),
+               DIALOGFACTORY->updateMouseWidget(tr("Select second entity"),
                        tr("Back"));
                break;
 
        case SetLength1:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter length 1:"),
+               DIALOGFACTORY->updateMouseWidget(tr("Enter length 1:"),
                        tr("Back"));
                break;
 
        case SetLength2:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter length 2:"),
+               DIALOGFACTORY->updateMouseWidget(tr("Enter length 2:"),
                        tr("Back"));
                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;
        }
 }
@@ -289,7 +289,7 @@ void ActionModifyBevel::updateMouseCursor()
 
 void ActionModifyBevel::updateToolBar()
 {
-       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+       DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
 }
 
 void ActionModifyBevel::setLength1(double l1)