]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actionzoomwindow.cpp
In the middle of major refactoring...
[architektonas] / src / actions / actionzoomwindow.cpp
similarity index 65%
rename from src/actions/rs_actionzoomwindow.cpp
rename to src/actions/actionzoomwindow.cpp
index 1c53bbbb4c308d5d9314637444b79cf0d3db2dd2..e16c7ae0fdee768b64f2868b81c15c4a92c1afa8 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionzoomwindow.cpp
+// actionzoomwindow.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/05/2010  Added this text. :-)
 //
 
-#include "rs_actionzoomwindow.h"
+#include "actionzoomwindow.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
  *          in x and y will stay the same. false Exactly the chosen
  *          area will be fit to the viewport.
  */
-RS_ActionZoomWindow::RS_ActionZoomWindow(RS_EntityContainer & container,
+ActionZoomWindow::ActionZoomWindow(RS_EntityContainer & container,
        GraphicView & graphicView, bool keepAspectRatio):
-       RS_PreviewActionInterface("Zoom Window", container, graphicView)
+       ActionInterface("Zoom Window", container, graphicView)
 {
        this->keepAspectRatio = keepAspectRatio;
 }
 
-RS_ActionZoomWindow::~RS_ActionZoomWindow()
+ActionZoomWindow::~ActionZoomWindow()
 {
 }
 
-void RS_ActionZoomWindow::init(int status)
+void ActionZoomWindow::init(int status)
 {
-       RS_DEBUG->print("RS_ActionZoomWindow::init()");
-
-       RS_PreviewActionInterface::init(status);
+       RS_DEBUG->print("ActionZoomWindow::init()");
+       ActionInterface::init(status);
        v1 = v2 = Vector(false);
-       snapMode = RS2::SnapFree;
-       snapRes = RS2::RestrictNothing;
+/*     snapMode = RS2::SnapFree;
+       snapRes = RS2::RestrictNothing;*/
 }
 
-void RS_ActionZoomWindow::trigger()
+void ActionZoomWindow::trigger()
 {
-       RS_DEBUG->print("RS_ActionZoomWindow::trigger()");
+       RS_DEBUG->print("ActionZoomWindow::trigger()");
 
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        if (v1.valid && v2.valid)
        {
@@ -65,26 +64,26 @@ void RS_ActionZoomWindow::trigger()
        }
 }
 
-void RS_ActionZoomWindow::mouseMoveEvent(QMouseEvent * e)
+void ActionZoomWindow::mouseMoveEvent(QMouseEvent * e)
 {
        if (getStatus() == 1 && v1.valid)
        {
                v2 = snapPoint(e);
                deletePreview();
                clearPreview();
-               preview->addEntity(new RS_Line(preview,
+/*             preview->addEntity(new RS_Line(preview,
                                RS_LineData(Vector(v1.x, v1.y), Vector(v2.x, v1.y))));
                preview->addEntity(new RS_Line(preview,
                                RS_LineData(Vector(v2.x, v1.y), Vector(v2.x, v2.y))));
                preview->addEntity(new RS_Line(preview,
                                RS_LineData(Vector(v2.x, v2.y), Vector(v1.x, v2.y))));
                preview->addEntity(new RS_Line(preview,
-                               RS_LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));
+                               RS_LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));*/
                drawPreview();
        }
 }
 
-void RS_ActionZoomWindow::mousePressEvent(QMouseEvent * e)
+void ActionZoomWindow::mousePressEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -100,12 +99,12 @@ void RS_ActionZoomWindow::mousePressEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("RS_ActionZoomWindow::mousePressEvent(): %f %f", v1.x, v1.y);
+       RS_DEBUG->print("ActionZoomWindow::mousePressEvent(): %f %f", v1.x, v1.y);
 }
 
-void RS_ActionZoomWindow::mouseReleaseEvent(QMouseEvent * e)
+void ActionZoomWindow::mouseReleaseEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionZoomWindow::mouseReleaseEvent()");
+       RS_DEBUG->print("ActionZoomWindow::mouseReleaseEvent()");
 
        if (e->button() == Qt::RightButton)
        {
@@ -122,9 +121,9 @@ void RS_ActionZoomWindow::mouseReleaseEvent(QMouseEvent * e)
                }
 }
 
-void RS_ActionZoomWindow::updateMouseButtonHints()
+void ActionZoomWindow::updateMouseButtonHints()
 {
-       RS_DEBUG->print("RS_ActionZoomWindow::updateMouseButtonHints()");
+       RS_DEBUG->print("ActionZoomWindow::updateMouseButtonHints()");
 
        switch (getStatus())
        {
@@ -142,9 +141,9 @@ void RS_ActionZoomWindow::updateMouseButtonHints()
        }
 }
 
-void RS_ActionZoomWindow::updateMouseCursor()
+void ActionZoomWindow::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::MagnifierCursor);
 }
 
-// EOF
+