]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actionmodifyscale.cpp
Initial phase of adding polyline functionality. DOES NOT COMPILE.
[architektonas] / src / actions / actionmodifyscale.cpp
index 4b6b482e4e2653c83374447ca10694c94ffc3c05..d1aadc90fb26b76487bcf9d195fff00e2ef128af 100644 (file)
@@ -3,7 +3,9 @@
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // Extensively rewritten and refactored by James L. Hammons
-// (C) 2010 Underground Software
+// Portions copyright (C) 2001-2003 RibbonSoft
+// Copyright (C) 2010 Underground Software
+// See the README and GPLv2 files for licensing and warranty information
 //
 // JLH = James L. Hammons <jlhamm@acm.org>
 //
 
 #include "actionmodifyscale.h"
 
-#include "rs_dialogfactory.h"
+#include "debug.h"
+#include "dialogfactory.h"
 
-ActionModifyScale::ActionModifyScale(RS_EntityContainer & container, GraphicView & graphicView):
+ActionModifyScale::ActionModifyScale(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Scale Entities", container, graphicView)
 {
 }
@@ -32,17 +35,17 @@ void ActionModifyScale::init(int status)
 
 void ActionModifyScale::trigger()
 {
-       RS_DEBUG->print("ActionModifyScale::trigger()");
+       DEBUG->print("ActionModifyScale::trigger()");
 
-       RS_Modification m(*container, graphicView);
+       Modification m(*container, graphicView);
        m.scale(data);
 
-       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
 void ActionModifyScale::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionModifyScale::mouseMoveEvent begin");
+       DEBUG->print("ActionModifyScale::mouseMoveEvent begin");
 
        if (getStatus() == SetReferencePoint)
        {
@@ -59,7 +62,7 @@ void ActionModifyScale::mouseMoveEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("ActionModifyScale::mouseMoveEvent end");
+       DEBUG->print("ActionModifyScale::mouseMoveEvent end");
 }
 
 void ActionModifyScale::mouseReleaseEvent(QMouseEvent * e)
@@ -73,7 +76,7 @@ void ActionModifyScale::mouseReleaseEvent(QMouseEvent * e)
                case SetReferencePoint:
                        setStatus(ShowDialog);
 
-                       if (RS_DIALOGFACTORY->requestScaleDialog(data))
+                       if (DIALOGFACTORY->requestScaleDialog(data))
                        {
                                data.referencePoint = referencePoint;
                                trigger();
@@ -98,11 +101,11 @@ void ActionModifyScale::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetReferencePoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -117,11 +120,11 @@ void ActionModifyScale::updateToolBar()
        switch (getStatus())
        {
        case SetReferencePoint:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                break;
 
        default:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
                break;
        }
 }