]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actioninfodist2.cpp
In the middle of major refactoring...
[architektonas] / src / actions / actioninfodist2.cpp
similarity index 63%
rename from src/actions/rs_actioninfodist2.cpp
rename to src/actions/actioninfodist2.cpp
index c8cea153c7e6ae599a98c9dd81d0260c749cb6f6..2bf002886ed0331c491d8bf7764b7c8871d65ebd 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actioninfodist2.cpp
+// actioninfodist2.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actioninfodist2.h"
+#include "actioninfodist2.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionInfoDist2::RS_ActionInfoDist2(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Info Dist2", container, graphicView)
+ActionInfoDist2::ActionInfoDist2(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Info Dist2", container, graphicView)
 {
 }
 
-RS_ActionInfoDist2::~RS_ActionInfoDist2()
+ActionInfoDist2::~ActionInfoDist2()
 {
 }
 
-void RS_ActionInfoDist2::init(int status)
+void ActionInfoDist2::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionInfoDist2::trigger()
+void ActionInfoDist2::trigger()
 {
-       RS_DEBUG->print("RS_ActionInfoDist2::trigger()");
+       RS_DEBUG->print("ActionInfoDist2::trigger()");
        deleteSnapper();
 
        if (point.valid && entity != NULL)
@@ -46,9 +46,9 @@ void RS_ActionInfoDist2::trigger()
        }
 }
 
-void RS_ActionInfoDist2::mouseMoveEvent(QMouseEvent * e)
+void ActionInfoDist2::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionInfoDist2::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionInfoDist2::mouseMoveEvent begin");
 
        switch (getStatus())
        {
@@ -57,19 +57,19 @@ void RS_ActionInfoDist2::mouseMoveEvent(QMouseEvent * e)
                break;
 
        case SetPoint:
-
                if (entity != NULL)
                        point = snapPoint(e);
+
                break;
 
        default:
                break;
        }
 
-       RS_DEBUG->print("RS_ActionInfoDist2::mouseMoveEvent end");
+       RS_DEBUG->print("ActionInfoDist2::mouseMoveEvent end");
 }
 
-void RS_ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e)
+void ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -82,11 +82,12 @@ void RS_ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e)
                                setStatus(SetPoint);
                        break;
 
-               case SetPoint: {
+               case SetPoint:
+               {
                        Vector ce(snapPoint(e));
                        coordinateEvent(&ce);
                }
-               break;
+                       break;
 
                default:
                        break;
@@ -100,7 +101,7 @@ void RS_ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionInfoDist2::coordinateEvent(Vector * e)
+void ActionInfoDist2::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -114,20 +115,16 @@ void RS_ActionInfoDist2::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionInfoDist2::updateMouseButtonHints()
+void ActionInfoDist2::updateMouseButtonHints()
 {
        switch (getStatus())
        {
        case SetEntity:
-               RS_DIALOGFACTORY->updateMouseWidget(
-                       tr("Specify entity"),
-                       tr("Cancel"));
+               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify entity"), tr("Cancel"));
                break;
 
        case SetPoint:
-               RS_DIALOGFACTORY->updateMouseWidget(
-                       tr("Specify point"),
-                       tr("Back"));
+               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify point"), tr("Back"));
                break;
 
        default:
@@ -136,12 +133,12 @@ void RS_ActionInfoDist2::updateMouseButtonHints()
        }
 }
 
-void RS_ActionInfoDist2::updateMouseCursor()
+void ActionInfoDist2::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionInfoDist2::updateToolBar()
+void ActionInfoDist2::updateToolBar()
 {
        switch (getStatus())
        {
@@ -155,5 +152,3 @@ void RS_ActionInfoDist2::updateToolBar()
                break;
        }
 }
-
-// EOF