]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actionmodifyattributes.cpp
Bugfixes related to removing Snapper class.
[architektonas] / src / actions / actionmodifyattributes.cpp
index e66d3d47db9fbd00e5ed37ec784c7e4f57d7cb68..fcbe0f52c247fc6238b9b4dd945f08ca04a3734a 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 "actionmodifyattributes.h"
 
-#include "rs_dialogfactory.h"
+#include "dialogfactory.h"
 #include "drawing.h"
 #include "graphicview.h"
-#include "rs_modification.h"
+#include "modification.h"
 
 ActionModifyAttributes::ActionModifyAttributes(
-       RS_EntityContainer & container, GraphicView & graphicView):
+       EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Change Attributes", container, graphicView)
 {
 }
@@ -37,28 +39,30 @@ void ActionModifyAttributes::init(int status)
 
 void ActionModifyAttributes::trigger()
 {
-       RS_DEBUG->print("ActionModifyAttributes::trigger()");
+       DEBUG->print("ActionModifyAttributes::trigger()");
 
-       RS_AttributesData data;
-       data.pen = RS_Pen();
+       AttributesData data;
+       data.pen = Pen();
        data.layer = "0";
        data.changeColor = false;
        data.changeLineType = false;
        data.changeWidth = false;
        data.changeLayer = false;
 
-       if (graphic != NULL)
-               if (RS_DIALOGFACTORY->requestAttributesDialog(data,
-                           *graphic->getLayerList()))
+       if (graphic)
+       {
+               if (DIALOGFACTORY->requestAttributesDialog(data,
+                   *graphic->getLayerList()))
                {
-                       RS_Modification m(*container, graphicView);
+                       Modification m(*container, graphicView);
                        m.changeAttributes(data);
                }
+       }
 
        finish();
        graphicView->killSelectActions();
 
-       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
 void ActionModifyAttributes::updateMouseButtonHints()
@@ -66,10 +70,10 @@ void ActionModifyAttributes::updateMouseButtonHints()
        switch (getStatus())
        {
        //case Acknowledge:
-       //RS_DIALOGFACTORY->updateMouseWidget(tr("Acknowledge"), tr("Cancel"));
+       //DIALOGFACTORY->updateMouseWidget(tr("Acknowledge"), tr("Cancel"));
        //break;
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -82,7 +86,7 @@ void ActionModifyAttributes::updateMouseCursor()
 void ActionModifyAttributes::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }