]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actionmodifyrotate2.cpp
In the middle of major refactoring...
[architektonas] / src / actions / actionmodifyrotate2.cpp
similarity index 61%
rename from src/actions/rs_actionmodifyrotate2.cpp
rename to src/actions/actionmodifyrotate2.cpp
index 0bdabab68526acfb4cb1cfc442b73e04bafbecbc..b5d6baac6c9bfd8e38013fdd3137634bde4e0f5d 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifyrotate2.cpp
+// actionmodifyrotate2.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifyrotate2.h"
+#include "actionmodifyrotate2.h"
 
 #include "rs_dialogfactory.h"
 
-RS_ActionModifyRotate2::RS_ActionModifyRotate2(
+ActionModifyRotate2::ActionModifyRotate2(
        RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Rotate Entities around two centers", container, graphicView)
+       ActionInterface("Rotate Entities around two centers", container, graphicView)
 {
 }
 
-RS_ActionModifyRotate2::~RS_ActionModifyRotate2()
+ActionModifyRotate2::~ActionModifyRotate2()
 {
 }
 
-void RS_ActionModifyRotate2::init(int status)
+void ActionModifyRotate2::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionModifyRotate2::trigger()
+void ActionModifyRotate2::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyRotate2::trigger()");
+       RS_DEBUG->print("ActionModifyRotate2::trigger()");
 
        RS_Modification m(*container, graphicView);
        m.rotate2(data);
@@ -43,12 +43,11 @@ void RS_ActionModifyRotate2::trigger()
        RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
-void RS_ActionModifyRotate2::mouseMoveEvent(QMouseEvent * e)
+void ActionModifyRotate2::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionModifyRotate2::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionModifyRotate2::mouseMoveEvent begin");
 
-       if (getStatus() == SetReferencePoint1
-           || getStatus() == SetReferencePoint2)
+       if (getStatus() == SetReferencePoint1 || getStatus() == SetReferencePoint2)
        {
                Vector mouse = snapPoint(e);
 
@@ -62,15 +61,7 @@ void RS_ActionModifyRotate2::mouseMoveEvent(QMouseEvent * e)
 
                        if (data.center1.valid)
                                data.center2 = mouse;
-                               //data.offset = data.center2-data.center1;
-
-                               /*deletePreview();
-                                  clearPreview();
-                                  preview->addSelectionFrom(*container);
-                                  preview->rotate(data.center1, data.angle);
-                                  preview->move(data.offset);
-                                  drawPreview();
-                                */
+
                        break;
 
                default:
@@ -78,10 +69,10 @@ void RS_ActionModifyRotate2::mouseMoveEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("RS_ActionModifyRotate2::mouseMoveEvent end");
+       RS_DEBUG->print("ActionModifyRotate2::mouseMoveEvent end");
 }
 
-void RS_ActionModifyRotate2::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyRotate2::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -96,7 +87,7 @@ void RS_ActionModifyRotate2::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyRotate2::coordinateEvent(Vector * e)
+void ActionModifyRotate2::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -124,17 +115,17 @@ void RS_ActionModifyRotate2::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionModifyRotate2::commandEvent(RS_CommandEvent * /*e*/)
+void ActionModifyRotate2::commandEvent(RS_CommandEvent * /*e*/)
 {
 }
 
-QStringList RS_ActionModifyRotate2::getAvailableCommands()
+QStringList ActionModifyRotate2::getAvailableCommands()
 {
        QStringList cmd;
        return cmd;
 }
 
-void RS_ActionModifyRotate2::updateMouseButtonHints()
+void ActionModifyRotate2::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -154,12 +145,12 @@ void RS_ActionModifyRotate2::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyRotate2::updateMouseCursor()
+void ActionModifyRotate2::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionModifyRotate2::updateToolBar()
+void ActionModifyRotate2::updateToolBar()
 {
        switch (getStatus())
        {
@@ -173,5 +164,3 @@ void RS_ActionModifyRotate2::updateToolBar()
                break;
        }
 }
-
-// EOF