]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actiondrawtext.cpp
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / actions / actiondrawtext.cpp
index 7e3d2337e4f3b1e44c9bba998af6e07f598f9963..e3b370b019dece892bc67a84294a560206f15834 100644 (file)
@@ -24,7 +24,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawText::ActionDrawText(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Text", container, graphicView)
+ActionDrawText::ActionDrawText(EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Text", container, graphicView)
 {
        pos = Vector(false);
        textChanged = true;
@@ -43,7 +43,7 @@ void ActionDrawText::init(int status)
 {
        ActionInterface::init(status);
 
-       if (RS_DIALOGFACTORY == NULL)
+       if (DIALOGFACTORY == NULL)
                return;
 
        switch (status)
@@ -53,9 +53,9 @@ void ActionDrawText::init(int status)
                clearPreview();
                reset();
 
-               RS_Text tmp(NULL, data);
+               Text tmp(NULL, data);
 
-               if (RS_DIALOGFACTORY->requestTextDialog(&tmp))
+               if (DIALOGFACTORY->requestTextDialog(&tmp))
                {
                        data = tmp.getData();
                        preparePreview();
@@ -75,7 +75,7 @@ void ActionDrawText::init(int status)
        break;
 
        case SetPos:
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                break;
 
        default:
@@ -85,14 +85,14 @@ void ActionDrawText::init(int status)
 
 void ActionDrawText::reset()
 {
-       data = RS_TextData(Vector(0.0, 0.0), 1.0, 100.0, RS2::VAlignTop,
+       data = TextData(Vector(0.0, 0.0), 1.0, 100.0, RS2::VAlignTop,
                RS2::HAlignLeft, RS2::LeftToRight, RS2::Exact, 1.0, data.text,
                "standard", 0.0, RS2::Update);
 }
 
 void ActionDrawText::trigger()
 {
-       RS_DEBUG->print("ActionDrawText::trigger()");
+       DEBUG->print("ActionDrawText::trigger()");
 
        if (pos.valid)
        {
@@ -101,7 +101,7 @@ void ActionDrawText::trigger()
                clearPreview();
                deleteSnapper();
 
-               RS_Text * text = new RS_Text(container, data);
+               Text * text = new Text(container, data);
                text->update();
                container->addEntity(text);
 
@@ -124,7 +124,7 @@ void ActionDrawText::preparePreview()
 {
 /*     clearPreview();
        data.insertionPoint = Vector(0.0, 0.0);
-       RS_Text * text = new RS_Text(preview, data);
+       Text * text = new Text(preview, data);
        text->update();
        preview->addEntity(text);
        textChanged = false;*/
@@ -132,7 +132,7 @@ void ActionDrawText::preparePreview()
 
 void ActionDrawText::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawText::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawText::mouseMoveEvent begin");
 
        if (getStatus() == SetPos)
        {
@@ -154,7 +154,7 @@ void ActionDrawText::mouseMoveEvent(QMouseEvent * e)
                drawPreview();
        }
 
-       RS_DEBUG->print("ActionDrawText::mouseMoveEvent end");
+       DEBUG->print("ActionDrawText::mouseMoveEvent end");
 }
 
 void ActionDrawText::mouseReleaseEvent(QMouseEvent * e)
@@ -201,14 +201,14 @@ void ActionDrawText::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDrawText::commandEvent(RS_CommandEvent * e)
+void ActionDrawText::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
                return;
        }
@@ -231,8 +231,8 @@ void ActionDrawText::commandEvent(RS_CommandEvent * e)
        case SetText:
                setText(e->getCommand());
 
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->requestOptions(this, true, true);
 
                graphicView->enableCoordinateInput();
                setStatus(SetPos);
@@ -257,35 +257,35 @@ void ActionDrawText::showOptions()
 {
        ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, true, true);
 }
 
 void ActionDrawText::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, false);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionDrawText::updateMouseButtonHints()
 {
-       if (!RS_DIALOGFACTORY)
+       if (!DIALOGFACTORY)
                return;
 
        switch (getStatus())
        {
        case SetPos:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify insertion point"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify insertion point"), tr("Cancel"));
                break;
 
        case SetText:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter text:"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Enter text:"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -297,17 +297,17 @@ void ActionDrawText::updateMouseCursor()
 
 void ActionDrawText::updateToolBar()
 {
-       if (!RS_DIALOGFACTORY)
+       if (!DIALOGFACTORY)
                return;
 
        switch (getStatus())
        {
        case SetPos:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                break;
 
        default:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
                break;
        }
 }