]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actionblocksinsert.cpp
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / actions / actionblocksinsert.cpp
index 09eae0f22245b60ecbc47e42725d31020ab7f626..48d6ff985c15c08c39a229b4fb5c5473ccf062c6 100644 (file)
@@ -12,7 +12,7 @@
 // Who  When        What
 // ---  ----------  -----------------------------------------------------------
 // JLH  06/03/2010  Added this text. :-)
-// JLH  06/03/2010  Scrubbed out all occurances of RS_CoordinateEvent
+// JLH  06/03/2010  Scrubbed out all occurances of CoordinateEvent
 //
 
 #include "actionblocksinsert.h"
@@ -27,7 +27,7 @@
 /**
  * Constructor.
  */
-ActionBlocksInsert::ActionBlocksInsert(RS_EntityContainer & container, GraphicView & graphicView):
+ActionBlocksInsert::ActionBlocksInsert(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Blocks Insert", container, graphicView)
 {
 }
@@ -59,7 +59,7 @@ void ActionBlocksInsert::init(int status /*= 0*/)
 
 void ActionBlocksInsert::reset()
 {
-       data = RS_InsertData("", Vector(0.0, 0.0), Vector(1.0, 1.0), 0.0, 1, 1,
+       data = InsertData("", Vector(0.0, 0.0), Vector(1.0, 1.0), 0.0, 1, 1,
                Vector(1.0, 1.0), NULL, RS2::Update);
 }
 
@@ -69,13 +69,13 @@ void ActionBlocksInsert::trigger()
 //     deletePreview();
 //     clearPreview();
 
-       //RS_Modification m(*container, graphicView);
+       //Modification m(*container, graphicView);
        //m.paste(data.insertionPoint);
-       //std::cout << *RS_Clipboard::instance();
+       //std::cout << *Clipboard::instance();
 
        if (block)
        {
-               RS_Creation creation(container, graphicView);
+               Creation creation(container, graphicView);
                data.updateMode = RS2::Update;
                creation.createInsert(data);
        }
@@ -97,8 +97,8 @@ void ActionBlocksInsert::mouseMoveEvent(QMouseEvent * e)
 //                     clearPreview();
                        //preview->addAllFrom(*block);
                        //preview->move(data.insertionPoint);
-//                     RS_Creation creation(preview, NULL, false);
-                       RS_Creation creation(&(graphicView->preview), NULL, false);
+//                     Creation creation(preview, NULL, false);
+                       Creation creation(&(graphicView->preview), NULL, false);
                        // Create insert as preview only
                        data.updateMode = RS2::PreviewUpdate;
                        creation.createInsert(data);
@@ -135,13 +135,13 @@ void ActionBlocksInsert::coordinateEvent(Vector * e)
        trigger();
 }
 
-void ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
+void ActionBlocksInsert::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -203,14 +203,14 @@ void ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
        case SetAngle:
        {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok)
-                       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;
@@ -218,14 +218,14 @@ void ActionBlocksInsert::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;
@@ -233,14 +233,14 @@ void ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
        case SetColumns:
        {
                bool ok;
-               int cols = (int)RS_Math::eval(c, &ok);
+               int cols = (int)Math::eval(c, &ok);
 
                if (ok)
                        data.cols = cols;
                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;
@@ -248,14 +248,14 @@ void ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
        case SetRows:
        {
                bool ok;
-               int rows = (int)RS_Math::eval(c, &ok);
+               int rows = (int)Math::eval(c, &ok);
 
                if (ok)
                        data.rows = rows;
                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;
@@ -263,14 +263,14 @@ void ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
        case SetColumnSpacing:
        {
                bool ok;
-               double cs = (int)RS_Math::eval(c, &ok);
+               double cs = (int)Math::eval(c, &ok);
 
                if (ok)
                        data.spacing.x = cs;
                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;
@@ -278,14 +278,14 @@ void ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
        case SetRowSpacing:
        {
                bool ok;
-               int rs = (int)RS_Math::eval(c, &ok);
+               int rs = (int)Math::eval(c, &ok);
 
                if (ok)
                        data.spacing.y = rs;
                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;
@@ -320,13 +320,13 @@ QStringList ActionBlocksInsert::getAvailableCommands()
 void ActionBlocksInsert::showOptions()
 {
        ActionInterface::showOptions();
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionBlocksInsert::hideOptions()
 {
        ActionInterface::hideOptions();
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionBlocksInsert::updateMouseButtonHints()
@@ -334,35 +334,35 @@ void ActionBlocksInsert::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;
 
        case SetColumns:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter columns:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter columns:"), "");
                break;
 
        case SetRows:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter rows:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter rows:"), "");
                break;
 
        case SetColumnSpacing:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter column spacing:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter column spacing:"), "");
                break;
 
        case SetRowSpacing:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter row spacing:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter row spacing:"), "");
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -375,9 +375,9 @@ void ActionBlocksInsert::updateMouseCursor()
 void ActionBlocksInsert::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
 
 double ActionBlocksInsert::getAngle()