1 // actionmodifydelete.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 "actionmodifydelete.h"
17 #include "rs_dialogfactory.h"
18 #include "graphicview.h"
19 #include "rs_modification.h"
21 ActionModifyDelete::ActionModifyDelete(RS_EntityContainer & container,
22 GraphicView & graphicView): ActionInterface("Delete Entities",
23 container, graphicView)
27 ActionModifyDelete::~ActionModifyDelete()
31 void ActionModifyDelete::init(int status)
33 ActionInterface::init(status);
37 void ActionModifyDelete::trigger()
39 RS_DEBUG->print("ActionModifyDelete::trigger()");
40 RS_Modification m(*container, graphicView);
44 if (RS_DIALOGFACTORY != NULL)
45 RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
48 void ActionModifyDelete::updateMouseButtonHints()
50 if (RS_DIALOGFACTORY != NULL)
55 // RS_DIALOGFACTORY->updateMouseWidget(tr("Acknowledge"),
59 RS_DIALOGFACTORY->updateMouseWidget("", "");
65 void ActionModifyDelete::updateMouseCursor()
67 graphicView->setMouseCursor(RS2::DelCursor);
70 void ActionModifyDelete::updateToolBar()
72 if (RS_DIALOGFACTORY != NULL)
75 RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
77 RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);