]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actiondrawimage.cpp
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / actions / actiondrawimage.cpp
index 524663cb24d50f74bdaf2fbced8dd4f97a7bd156..fb7e3e7d4d6efcaef979d372f8c73f0aaae95208 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * Constructor.
  */
-ActionDrawImage::ActionDrawImage(RS_EntityContainer & container, GraphicView & graphicView):
+ActionDrawImage::ActionDrawImage(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Image", container, graphicView)
 {
 }
@@ -45,7 +45,7 @@ void ActionDrawImage::init(int status)
 
        reset();
 
-       data.file = RS_DIALOGFACTORY->requestImageOpenDialog();
+       data.file = DIALOGFACTORY->requestImageOpenDialog();
        graphicView->redraw();
 
        if (!data.file.isEmpty())
@@ -59,13 +59,13 @@ void ActionDrawImage::init(int status)
        {
                finish();
                updateToolBar();
-               //RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+               //DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
        }
 }
 
 void ActionDrawImage::reset()
 {
-       data = RS_ImageData(0,
+       data = ImageData(0,
                        Vector(0.0, 0.0),
                        Vector(1.0, 0.0),
                        Vector(0.0, 1.0),
@@ -82,7 +82,7 @@ void ActionDrawImage::trigger()
 
        if (!data.file.isEmpty())
        {
-               RS_Creation creation(container, graphicView);
+               Creation creation(container, graphicView);
                creation.createImage(data);
        }
 
@@ -100,16 +100,16 @@ void ActionDrawImage::mouseMoveEvent(QMouseEvent * e)
 
 //             deletePreview();
 //             clearPreview();
-//             RS_Line * line;
-//             line = new RS_Line(preview, RS_LineData(Vector(0, 0), Vector(img.width(), 0)));
+//             Line * line;
+//             line = new Line(preview, LineData(Vector(0, 0), Vector(img.width(), 0)));
 //             preview->addEntity(line);
-//             line = new RS_Line(preview,
-//                     RS_LineData(Vector(img.width(), 0), Vector(img.width(), img.height())));
+//             line = new Line(preview,
+//                     LineData(Vector(img.width(), 0), Vector(img.width(), img.height())));
 //             preview->addEntity(line);
-//             line = new RS_Line(preview,
-//                     RS_LineData(Vector(img.width(), img.height()), Vector(0, img.height())));
+//             line = new Line(preview,
+//                     LineData(Vector(img.width(), img.height()), Vector(0, img.height())));
 //             preview->addEntity(line);
-//             line = new RS_Line(preview, RS_LineData(Vector(0, img.height()), Vector(0, 0)));
+//             line = new Line(preview, LineData(Vector(0, img.height()), Vector(0, 0)));
 //             preview->addEntity(line);
 //             preview->scale(Vector(0, 0), Vector(data.uVector.magnitude(), data.uVector.magnitude()));
 //             preview->rotate(Vector(0, 0), data.uVector.angle());
@@ -146,13 +146,13 @@ void ActionDrawImage::coordinateEvent(Vector * e)
        trigger();
 }
 
-void ActionDrawImage::commandEvent(RS_CommandEvent * e)
+void ActionDrawImage::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -182,14 +182,14 @@ void ActionDrawImage::commandEvent(RS_CommandEvent * e)
        case SetAngle:
        {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok)
-                       setAngle(RS_Math::deg2rad(a));
+                       setAngle(Math::deg2rad(a));
                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;
@@ -197,14 +197,14 @@ void ActionDrawImage::commandEvent(RS_CommandEvent * e)
        case SetFactor:
        {
                bool ok;
-               double f = RS_Math::eval(c, &ok);
+               double f = Math::eval(c, &ok);
 
                if (ok)
                        setFactor(f);
                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;
@@ -236,14 +236,14 @@ void ActionDrawImage::showOptions()
 {
        ActionInterface::showOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionDrawImage::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionDrawImage::updateMouseButtonHints()
@@ -251,19 +251,19 @@ void ActionDrawImage::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetTargetPoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
                break;
 
        case SetAngle:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter angle:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter angle:"), "");
                break;
 
        case SetFactor:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter factor:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter factor:"), "");
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -276,9 +276,9 @@ void ActionDrawImage::updateMouseCursor()
 void ActionDrawImage::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
 
 double ActionDrawImage::getAngle()