]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actiondimangular.cpp
In the middle of major refactoring...
[architektonas] / src / actions / actiondimangular.cpp
similarity index 77%
rename from src/actions/rs_actiondimangular.cpp
rename to src/actions/actiondimangular.cpp
index 3442ad73702331508bb1896cc533bf7293dcdd6a..e41561d94e296be32d3e3c33a774171e1427cfea 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondimangular.cpp
+// actiondimangular.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actiondimangular.h"
+#include "actiondimangular.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "rs_information.h"
 #include "rs_preview.h"
 
-RS_ActionDimAngular::RS_ActionDimAngular(RS_EntityContainer & container, GraphicView & graphicView): RS_ActionDimension("Draw Angular Dimensions",
+ActionDimAngular::ActionDimAngular(RS_EntityContainer & container, GraphicView & graphicView): ActionDimension("Draw Angular Dimensions",
                container, graphicView)
 {
        reset();
 }
 
-RS_ActionDimAngular::~RS_ActionDimAngular()
+ActionDimAngular::~ActionDimAngular()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDimAngular::rtti()
+/*virtual*/ RS2::ActionType ActionDimAngular::rtti()
 {
        return RS2::ActionDimAngular;
 }
 
-void RS_ActionDimAngular::reset()
+void ActionDimAngular::reset()
 {
-       RS_ActionDimension::reset();
+       ActionDimension::reset();
        edata = RS_DimAngularData(Vector(false), Vector(false), Vector(false), Vector(false));
        line1 = NULL;
        line2 = NULL;
@@ -45,9 +45,9 @@ void RS_ActionDimAngular::reset()
        RS_DIALOGFACTORY->requestOptions(this, true, true);
 }
 
-void RS_ActionDimAngular::trigger()
+void ActionDimAngular::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        if (line1 != NULL && line2 != NULL)
        {
@@ -76,13 +76,13 @@ void RS_ActionDimAngular::trigger()
                graphicView->moveRelativeZero(rz);
        }
        else
-               RS_DEBUG->print("RS_ActionDimAngular::trigger:"
+               RS_DEBUG->print("ActionDimAngular::trigger:"
                        " Entity is NULL\n");
 }
 
-void RS_ActionDimAngular::mouseMoveEvent(QMouseEvent * e)
+void ActionDimAngular::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDimAngular::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDimAngular::mouseMoveEvent begin");
 
        Vector mouse(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
 
@@ -96,18 +96,18 @@ void RS_ActionDimAngular::mouseMoveEvent(QMouseEvent * e)
 
        case SetPos:
 
-               if (line1 != NULL && line2 != NULL && center.valid)
+               if (line1 && line2 && center.valid)
                {
                        Vector mouse = snapPoint(e);
                        edata.definitionPoint4 = mouse;
 
-                       RS_DimAngular * d = new RS_DimAngular(preview, data, edata);
-                       d->update();
-
-                       deletePreview();
-                       clearPreview();
-                       preview->addEntity(d);
-                       drawPreview();
+//                     RS_DimAngular * d = new RS_DimAngular(preview, data, edata);
+//                     d->update();
+//
+//                     deletePreview();
+//                     clearPreview();
+//                     preview->addEntity(d);
+//                     drawPreview();
                }
                break;
 
@@ -115,16 +115,17 @@ void RS_ActionDimAngular::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDimAngular::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDimAngular::mouseMoveEvent end");
 }
 
-void RS_ActionDimAngular::mouseReleaseEvent(QMouseEvent * e)
+void ActionDimAngular::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
                switch (getStatus())
                {
-               case SetLine1: {
+               case SetLine1:
+               {
                        RS_Entity * en = catchEntity(e, RS2::ResolveAll);
 
                        if (en != NULL
@@ -136,7 +137,8 @@ void RS_ActionDimAngular::mouseReleaseEvent(QMouseEvent * e)
                }
                break;
 
-               case SetLine2: {
+               case SetLine2:
+               {
                        RS_Entity * en = catchEntity(e, RS2::ResolveAll);
 
                        if (en != NULL
@@ -181,7 +183,8 @@ void RS_ActionDimAngular::mouseReleaseEvent(QMouseEvent * e)
                }
                break;
 
-               case SetPos: {
+               case SetPos:
+               {
                        Vector ce(snapPoint(e));
                        coordinateEvent(&ce);
                }
@@ -197,9 +200,9 @@ void RS_ActionDimAngular::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDimAngular::coordinateEvent(Vector * e)
+void ActionDimAngular::coordinateEvent(Vector * e)
 {
-       if (e == NULL)
+       if (!e)
                return;
 
        switch (getStatus())
@@ -216,7 +219,7 @@ void RS_ActionDimAngular::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDimAngular::commandEvent(RS_CommandEvent * e)
+void ActionDimAngular::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -246,7 +249,7 @@ void RS_ActionDimAngular::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDimAngular::getAvailableCommands()
+QStringList ActionDimAngular::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -265,21 +268,21 @@ QStringList RS_ActionDimAngular::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDimAngular::showOptions()
+void ActionDimAngular::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionDimAngular::hideOptions()
+void ActionDimAngular::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDimAngular::updateMouseButtonHints()
+void ActionDimAngular::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -307,5 +310,3 @@ void RS_ActionDimAngular::updateMouseButtonHints()
                break;
        }
 }
-
-// EOF