]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actiondimradial.cpp
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / actions / actiondimradial.cpp
index 4fd12fe295e41efa348c67b0d6cb4231f23b8275..4feb389eb79fb485466c0b647509a7d0c1e9ef8f 100644 (file)
@@ -22,7 +22,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDimRadial::ActionDimRadial(RS_EntityContainer & container, GraphicView & graphicView):
+ActionDimRadial::ActionDimRadial(EntityContainer & container, GraphicView & graphicView):
        ActionDimension("Draw Radial Dimensions", container, graphicView)
 {
        reset();
@@ -41,10 +41,10 @@ void ActionDimRadial::reset()
 {
        ActionDimension::reset();
 
-       edata = RS_DimRadialData(Vector(false), 0.0);
+       edata = DimRadialData(Vector(false), 0.0);
        entity = NULL;
        pos = Vector(false);
-       RS_DIALOGFACTORY->requestOptions(this, true, true);
+       DIALOGFACTORY->requestOptions(this, true, true);
 }
 
 void ActionDimRadial::trigger()
@@ -55,7 +55,7 @@ void ActionDimRadial::trigger()
 
        if (entity)
        {
-               RS_DimRadial * newEntity = new RS_DimRadial(container, data, edata);
+               DimRadial * newEntity = new DimRadial(container, data, edata);
                newEntity->setLayerToActive();
                newEntity->setPenToActive();
                newEntity->update();
@@ -77,7 +77,7 @@ void ActionDimRadial::trigger()
                //drawSnapper();
        }
        else
-               RS_DEBUG->print("ActionDimRadial::trigger: Entity is NULL\n");
+               DEBUG->print("ActionDimRadial::trigger: Entity is NULL\n");
 }
 
 void ActionDimRadial::preparePreview()
@@ -88,9 +88,9 @@ void ActionDimRadial::preparePreview()
                double radius = 0.0;
 
                if (entity->rtti() == RS2::EntityArc)
-                       radius = ((RS_Arc *)entity)->getRadius();
+                       radius = ((Arc *)entity)->getRadius();
                else if (entity->rtti() == RS2::EntityCircle)
-                       radius = ((RS_Circle *)entity)->getRadius();
+                       radius = ((Circle *)entity)->getRadius();
 
                edata.definitionPoint.setPolar(radius, angle);
                edata.definitionPoint += data.definitionPoint;
@@ -99,7 +99,7 @@ void ActionDimRadial::preparePreview()
 
 void ActionDimRadial::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDimRadial::mouseMoveEvent begin");
+       DEBUG->print("ActionDimRadial::mouseMoveEvent begin");
 
        switch (getStatus())
        {
@@ -115,7 +115,7 @@ void ActionDimRadial::mouseMoveEvent(QMouseEvent * e)
 
                        preparePreview();
 
-//                     RS_DimRadial * d = new RS_DimRadial(preview, data, edata);
+//                     DimRadial * d = new DimRadial(preview, data, edata);
 //                     d->update();
 //
 //                     deletePreview();
@@ -129,7 +129,7 @@ void ActionDimRadial::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDimRadial::mouseMoveEvent end");
+       DEBUG->print("ActionDimRadial::mouseMoveEvent end");
 }
 
 void ActionDimRadial::mouseReleaseEvent(QMouseEvent * e)
@@ -139,7 +139,7 @@ void ActionDimRadial::mouseReleaseEvent(QMouseEvent * e)
                switch (getStatus())
                {
                case SetEntity: {
-                       RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+                       Entity * en = catchEntity(e, RS2::ResolveAll);
 
                        if (en != NULL)
                        {
@@ -150,15 +150,15 @@ void ActionDimRadial::mouseReleaseEvent(QMouseEvent * e)
 
                                        if (entity->rtti() == RS2::EntityArc)
                                                data.definitionPoint =
-                                                       ((RS_Arc *)entity)->getCenter();
+                                                       ((Arc *)entity)->getCenter();
                                        else if (entity->rtti() == RS2::EntityCircle)
                                                data.definitionPoint =
-                                                       ((RS_Circle *)entity)->getCenter();
+                                                       ((Circle *)entity)->getCenter();
                                        graphicView->moveRelativeZero(data.definitionPoint);
                                        setStatus(SetPos);
                                }
                                else
-                                       RS_DIALOGFACTORY->commandMessage(tr("Not a circle "
+                                       DIALOGFACTORY->commandMessage(tr("Not a circle "
                                                        "or arc entity"));
                        }
                }
@@ -202,13 +202,13 @@ void ActionDimRadial::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDimRadial::commandEvent(RS_CommandEvent * e)
+void ActionDimRadial::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -217,7 +217,7 @@ void ActionDimRadial::commandEvent(RS_CommandEvent * e)
        if (getStatus() == SetText)
        {
                setText(c);
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                graphicView->enableCoordinateInput();
                setStatus(lastStatus);
                return;
@@ -235,18 +235,18 @@ void ActionDimRadial::commandEvent(RS_CommandEvent * e)
        if (getStatus() == SetPos)
        {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok == true)
                {
-                       pos.setPolar(1.0, RS_Math::deg2rad(a));
+                       pos.setPolar(1.0, Math::deg2rad(a));
                        pos += data.definitionPoint;
                        trigger();
                        reset();
                        setStatus(SetEntity);
                }
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
                return;
        }
@@ -275,22 +275,22 @@ void ActionDimRadial::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetEntity:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Select arc or circle entity"),
+               DIALOGFACTORY->updateMouseWidget(tr("Select arc or circle entity"),
                        tr("Cancel"));
                break;
 
        case SetPos:
-               RS_DIALOGFACTORY->updateMouseWidget(
+               DIALOGFACTORY->updateMouseWidget(
                        tr("Specify dimension line position or enter angle:"),
                        tr("Cancel"));
                break;
 
        case SetText:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), "");
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -299,16 +299,16 @@ void ActionDimRadial::showOptions()
 {
        ActionInterface::showOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, true);
-       //RS_DIALOGFACTORY->requestDimRadialOptions(edata, true);
+       DIALOGFACTORY->requestOptions(this, true);
+       //DIALOGFACTORY->requestDimRadialOptions(edata, true);
 }
 
 void ActionDimRadial::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       //RS_DIALOGFACTORY->requestDimRadialOptions(edata, false);
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       //DIALOGFACTORY->requestDimRadialOptions(edata, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }