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 // 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 "actionmodifydelete.h"
19 #include "rs_dialogfactory.h"
20 #include "graphicview.h"
21 #include "rs_modification.h"
23 ActionModifyDelete::ActionModifyDelete(RS_EntityContainer & container,
24 GraphicView & graphicView): ActionInterface("Delete Entities",
25 container, graphicView)
29 ActionModifyDelete::~ActionModifyDelete()
33 void ActionModifyDelete::init(int status)
35 ActionInterface::init(status);
39 void ActionModifyDelete::trigger()
41 RS_DEBUG->print("ActionModifyDelete::trigger()");
42 RS_Modification m(*container, graphicView);
46 if (RS_DIALOGFACTORY != NULL)
47 RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
50 void ActionModifyDelete::updateMouseButtonHints()
52 if (RS_DIALOGFACTORY != NULL)
57 // RS_DIALOGFACTORY->updateMouseWidget(tr("Acknowledge"),
61 RS_DIALOGFACTORY->updateMouseWidget("", "");
67 void ActionModifyDelete::updateMouseCursor()
69 graphicView->setMouseCursor(RS2::DelCursor);
72 void ActionModifyDelete::updateToolBar()
74 if (RS_DIALOGFACTORY != NULL)
77 RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
79 RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);