]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actionmodifystretch.cpp
In the middle of major refactoring...
[architektonas] / src / actions / actionmodifystretch.cpp
similarity index 63%
rename from src/actions/rs_actionmodifystretch.cpp
rename to src/actions/actionmodifystretch.cpp
index df7c9ae3a3665b645f3b34dbb00cd2a6285380ac..d9568af9ecc5d112b25d0e2ef4697de2e829a788 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifystretch.cpp
+// actionmodifystretch.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifystretch.h"
+#include "actionmodifystretch.h"
 
 #include "rs_dialogfactory.h"
 #include "rs_modification.h"
 #include "rs_preview.h"
 
-RS_ActionModifyStretch::RS_ActionModifyStretch(RS_EntityContainer & container,
-       GraphicView & graphicView): RS_PreviewActionInterface("Stretch Entities",
+ActionModifyStretch::ActionModifyStretch(RS_EntityContainer & container,
+       GraphicView & graphicView): ActionInterface("Stretch Entities",
                container, graphicView)
 {
        firstCorner = Vector(false);
@@ -28,18 +28,18 @@ RS_ActionModifyStretch::RS_ActionModifyStretch(RS_EntityContainer & container,
        targetPoint = Vector(false);
 }
 
-RS_ActionModifyStretch::~RS_ActionModifyStretch()
+ActionModifyStretch::~ActionModifyStretch()
 {
 }
 
-void RS_ActionModifyStretch::init(int status)
+void ActionModifyStretch::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionModifyStretch::trigger()
+void ActionModifyStretch::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyStretch::trigger()");
+       RS_DEBUG->print("ActionModifyStretch::trigger()");
 
        deletePreview();
        clearPreview();
@@ -56,9 +56,9 @@ void RS_ActionModifyStretch::trigger()
        RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
-void RS_ActionModifyStretch::mouseMoveEvent(QMouseEvent * e)
+void ActionModifyStretch::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionModifyStretch::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionModifyStretch::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -68,67 +68,53 @@ void RS_ActionModifyStretch::mouseMoveEvent(QMouseEvent * e)
                break;
 
        case SetSecondCorner:
-
                if (firstCorner.valid)
                {
                        secondCorner = snapPoint(e);
                        deletePreview();
                        clearPreview();
+/*                     preview->addEntity(
+                               new RS_Line(preview, RS_LineData(Vector(firstCorner.x, firstCorner.y),
+                                       Vector(secondCorner.x, firstCorner.y))));
                        preview->addEntity(
-                               new RS_Line(preview,
-                                       RS_LineData(Vector(firstCorner.x,
-                                                       firstCorner.y),
-                                               Vector(secondCorner.x,
-                                                       firstCorner.y))));
-                       preview->addEntity(
-                               new RS_Line(preview,
-                                       RS_LineData(Vector(secondCorner.x,
-                                                       firstCorner.y),
-                                               Vector(secondCorner.x,
-                                                       secondCorner.y))));
+                               new RS_Line(preview, RS_LineData(Vector(secondCorner.x, firstCorner.y),
+                                               Vector(secondCorner.x, secondCorner.y))));
                        preview->addEntity(
-                               new RS_Line(preview,
-                                       RS_LineData(Vector(secondCorner.x,
-                                                       secondCorner.y),
-                                               Vector(firstCorner.x,
-                                                       secondCorner.y))));
+                               new RS_Line(preview, RS_LineData(Vector(secondCorner.x, secondCorner.y),
+                                               Vector(firstCorner.x, secondCorner.y))));
                        preview->addEntity(
-                               new RS_Line(preview,
-                                       RS_LineData(Vector(firstCorner.x,
-                                                       secondCorner.y),
-                                               Vector(firstCorner.x,
-                                                       firstCorner.y))));
+                               new RS_Line(preview, RS_LineData(Vector(firstCorner.x, secondCorner.y),
+                                               Vector(firstCorner.x, firstCorner.y))));*/
                        drawPreview();
                }
+
                break;
 
        case SetReferencePoint:
                break;
 
        case SetTargetPoint:
-
                if (referencePoint.valid)
                {
                        targetPoint = mouse;
 
                        deletePreview();
                        clearPreview();
-                       preview->addStretchablesFrom(*container, firstCorner, secondCorner);
-                       //preview->move(targetPoint-referencePoint);
-                       preview->stretch(firstCorner, secondCorner,
-                               targetPoint - referencePoint);
+/*                     preview->addStretchablesFrom(*container, firstCorner, secondCorner);
+                       preview->stretch(firstCorner, secondCorner, targetPoint - referencePoint);*/
                        drawPreview();
                }
+
                break;
 
        default:
                break;
        }
 
-       RS_DEBUG->print("RS_ActionModifyStretch::mouseMoveEvent end");
+       RS_DEBUG->print("ActionModifyStretch::mouseMoveEvent end");
 }
 
-void RS_ActionModifyStretch::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyStretch::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -143,7 +129,7 @@ void RS_ActionModifyStretch::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyStretch::coordinateEvent(Vector * e)
+void ActionModifyStretch::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -182,7 +168,7 @@ void RS_ActionModifyStretch::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionModifyStretch::updateMouseButtonHints()
+void ActionModifyStretch::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -212,12 +198,12 @@ void RS_ActionModifyStretch::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyStretch::updateMouseCursor()
+void ActionModifyStretch::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionModifyStretch::updateToolBar()
+void ActionModifyStretch::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
@@ -225,4 +211,4 @@ void RS_ActionModifyStretch::updateToolBar()
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
 }
 
-// EOF
+