]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actionlibraryinsert.cpp
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / actions / actionlibraryinsert.cpp
index eee135be6e380b617b5de509949db94828bace48..3a433dfabbf7ba6c4103e13f58c43620bbcf0d60 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * Constructor.
  */
-ActionLibraryInsert::ActionLibraryInsert(RS_EntityContainer & container, GraphicView & graphicView):
+ActionLibraryInsert::ActionLibraryInsert(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Library Insert", container, graphicView)
 {
 }
@@ -59,12 +59,12 @@ void ActionLibraryInsert::setFile(const QString & file)
        data.file = file;
 
        if (!prev.open(file, RS2::FormatUnknown))
-               RS_DIALOGFACTORY->commandMessage(tr("Cannot open file '%1'").arg(file));
+               DIALOGFACTORY->commandMessage(tr("Cannot open file '%1'").arg(file));
 }
 
 void ActionLibraryInsert::reset()
 {
-       /*data = RS_InsertData("",
+       /*data = InsertData("",
                             Vector(0.0,0.0),
                             Vector(1.0,1.0),
                             0.0,
@@ -84,7 +84,7 @@ void ActionLibraryInsert::trigger()
        deletePreview();
        clearPreview();
 
-       RS_Creation creation(container, graphicView);
+       Creation creation(container, graphicView);
        creation.createLibraryInsert(data);
 
        graphicView->redraw();
@@ -106,7 +106,7 @@ void ActionLibraryInsert::mouseMoveEvent(QMouseEvent * e)
                // unit conversion:
                if (graphic)
                {
-                       double uf = RS_Units::convert(1.0, prev.getUnit(), graphic->getUnit());
+                       double uf = Units::convert(1.0, prev.getUnit(), graphic->getUnit());
 //                     preview->scale(data.insertionPoint, Vector(uf, uf));
                }
 
@@ -142,13 +142,13 @@ void ActionLibraryInsert::coordinateEvent(Vector * e)
        trigger();
 }
 
-void ActionLibraryInsert::commandEvent(RS_CommandEvent * e)
+void ActionLibraryInsert::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands() + getAvailableCommands().join(", "));
+               DIALOGFACTORY->commandMessage(msgAvailableCommands() + getAvailableCommands().join(", "));
                return;
        }
 
@@ -177,14 +177,14 @@ void ActionLibraryInsert::commandEvent(RS_CommandEvent * e)
        case SetAngle:
        {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok == true)
-                       data.angle = RS_Math::deg2rad(a);
+                       data.angle = 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;
@@ -192,14 +192,14 @@ void ActionLibraryInsert::commandEvent(RS_CommandEvent * e)
        case SetFactor:
        {
                bool ok;
-               double f = RS_Math::eval(c, &ok);
+               double f = Math::eval(c, &ok);
 
                if (ok == true)
                        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;
@@ -231,14 +231,14 @@ void ActionLibraryInsert::showOptions()
 {
        ActionInterface::showOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionLibraryInsert::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionLibraryInsert::updateMouseButtonHints()
@@ -246,19 +246,19 @@ void ActionLibraryInsert::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;
        }
 }
@@ -271,9 +271,9 @@ void ActionLibraryInsert::updateMouseCursor()
 void ActionLibraryInsert::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
 
 double ActionLibraryInsert::getAngle()