]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actioneditpaste.cpp
In the middle of major refactoring...
[architektonas] / src / actions / actioneditpaste.cpp
similarity index 68%
rename from src/actions/rs_actioneditpaste.cpp
rename to src/actions/actioneditpaste.cpp
index 40f3110b19831df128803df135a12eef97680ca9..7d4ac423bdcc96dfa9bc897fffb720d4641bccfe 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actioneditpaste.cpp
+// actioneditpaste.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actioneditpaste.h"
+#include "actioneditpaste.h"
 
 #include "rs_clipboard.h"
 #include "rs_dialogfactory.h"
  *
  * @param undo true for undo and false for redo.
  */
-RS_ActionEditPaste::RS_ActionEditPaste(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Edit Paste",
+ActionEditPaste::ActionEditPaste(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Edit Paste",
                container, graphicView)
 {
 }
 
-RS_ActionEditPaste::~RS_ActionEditPaste()
+ActionEditPaste::~ActionEditPaste()
 {
 }
 
-void RS_ActionEditPaste::init(int status)
+void ActionEditPaste::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
        //trigger();
 }
 
-void RS_ActionEditPaste::trigger()
+void ActionEditPaste::trigger()
 {
        deleteSnapper();
        deletePreview();
@@ -48,13 +48,12 @@ void RS_ActionEditPaste::trigger()
 
        RS_Modification m(*container, graphicView);
        m.paste(RS_PasteData(targetPoint, 1.0, 0.0, false, ""));
-       //std::cout << *RS_Clipboard::instance();
 
        graphicView->redraw();
        finish();
 }
 
-void RS_ActionEditPaste::mouseMoveEvent(QMouseEvent * e)
+void ActionEditPaste::mouseMoveEvent(QMouseEvent * e)
 {
        switch (getStatus())
        {
@@ -63,16 +62,17 @@ void RS_ActionEditPaste::mouseMoveEvent(QMouseEvent * e)
 
                deletePreview();
                clearPreview();
-               preview->addAllFrom(*RS_CLIPBOARD->getGraphic());
-               preview->move(targetPoint);
+//             preview->addAllFrom(*RS_CLIPBOARD->getGraphic());
+//             preview->move(targetPoint);
 
-               if (graphic != NULL)
+               if (graphic)
                {
                        RS2::Unit sourceUnit = RS_CLIPBOARD->getGraphic()->getUnit();
                        RS2::Unit targetUnit = graphic->getUnit();
                        double f = RS_Units::convert(1.0, sourceUnit, targetUnit);
-                       preview->scale(targetPoint, Vector(f, f));
+//                     preview->scale(targetPoint, Vector(f, f));
                }
+
                drawPreview();
                break;
 
@@ -81,7 +81,7 @@ void RS_ActionEditPaste::mouseMoveEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionEditPaste::mouseReleaseEvent(QMouseEvent * e)
+void ActionEditPaste::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -95,7 +95,7 @@ void RS_ActionEditPaste::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionEditPaste::coordinateEvent(Vector * e)
+void ActionEditPaste::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -104,7 +104,7 @@ void RS_ActionEditPaste::coordinateEvent(Vector * e)
        trigger();
 }
 
-void RS_ActionEditPaste::updateMouseButtonHints()
+void ActionEditPaste::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -119,17 +119,15 @@ void RS_ActionEditPaste::updateMouseButtonHints()
        }
 }
 
-void RS_ActionEditPaste::updateMouseCursor()
+void ActionEditPaste::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionEditPaste::updateToolBar()
+void ActionEditPaste::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
-
-// EOF