1 // actionmodifyattributes.cpp
3 // Part of the Architektonas Project
4 // Originally part of QCad Community Edition by Andrew Mustun
5 // Extensively rewritten and refactored by James L. Hammons
6 // Portions copyright (C) 2001-2003 RibbonSoft
7 // Copyright (C) 2010 Underground Software
8 // See the README and GPLv2 files for licensing and warranty information
10 // JLH = James L. Hammons <jlhamm@acm.org>
13 // --- ---------- -----------------------------------------------------------
14 // JLH 06/04/2010 Added this text. :-)
17 #include "actionmodifyattributes.h"
19 #include "dialogfactory.h"
21 #include "graphicview.h"
22 #include "modification.h"
24 ActionModifyAttributes::ActionModifyAttributes(
25 EntityContainer & container, GraphicView & graphicView):
26 ActionInterface("Change Attributes", container, graphicView)
30 ActionModifyAttributes::~ActionModifyAttributes()
34 void ActionModifyAttributes::init(int status)
36 ActionInterface::init(status);
40 void ActionModifyAttributes::trigger()
42 DEBUG->print("ActionModifyAttributes::trigger()");
47 data.changeColor = false;
48 data.changeLineType = false;
49 data.changeWidth = false;
50 data.changeLayer = false;
54 if (DIALOGFACTORY->requestAttributesDialog(data,
55 *graphic->getLayerList()))
57 Modification m(*container, graphicView);
58 m.changeAttributes(data);
63 graphicView->killSelectActions();
65 DIALOGFACTORY->updateSelectionWidget(container->countSelected());
68 void ActionModifyAttributes::updateMouseButtonHints()
73 //DIALOGFACTORY->updateMouseWidget(tr("Acknowledge"), tr("Cancel"));
76 DIALOGFACTORY->updateMouseWidget("", "");
81 void ActionModifyAttributes::updateMouseCursor()
83 graphicView->setMouseCursor(RS2::DelCursor);
86 void ActionModifyAttributes::updateToolBar()
89 DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
91 DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);