1 // rs_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 // (C) 2010 Underground Software
8 // JLH = James L. Hammons <jlhamm@acm.org>
11 // --- ---------- -----------------------------------------------------------
12 // JLH 06/04/2010 Added this text. :-)
15 #include "rs_actionmodifyattributes.h"
17 #include "rs_dialogfactory.h"
19 #include "graphicview.h"
20 #include "rs_modification.h"
22 RS_ActionModifyAttributes::RS_ActionModifyAttributes(
23 RS_EntityContainer & container, GraphicView & graphicView):
24 RS_ActionInterface("Change Attributes", container, graphicView)
28 RS_ActionModifyAttributes::~RS_ActionModifyAttributes()
32 void RS_ActionModifyAttributes::init(int status)
34 RS_ActionInterface::init(status);
38 void RS_ActionModifyAttributes::trigger()
40 RS_DEBUG->print("RS_ActionModifyAttributes::trigger()");
42 RS_AttributesData data;
45 data.changeColor = false;
46 data.changeLineType = false;
47 data.changeWidth = false;
48 data.changeLayer = false;
51 if (RS_DIALOGFACTORY->requestAttributesDialog(data,
52 *graphic->getLayerList()))
54 RS_Modification m(*container, graphicView);
55 m.changeAttributes(data);
59 graphicView->killSelectActions();
61 RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
64 void RS_ActionModifyAttributes::updateMouseButtonHints()
69 //RS_DIALOGFACTORY->updateMouseWidget(tr("Acknowledge"), tr("Cancel"));
72 RS_DIALOGFACTORY->updateMouseWidget("", "");
77 void RS_ActionModifyAttributes::updateMouseCursor()
79 graphicView->setMouseCursor(RS2::DelCursor);
82 void RS_ActionModifyAttributes::updateToolBar()
85 RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
87 RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);