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"
20 #include "dialogfactory.h"
21 #include "graphicview.h"
22 #include "modification.h"
24 ActionModifyDelete::ActionModifyDelete(EntityContainer & container,
25 GraphicView & graphicView): ActionInterface("Delete Entities",
26 container, graphicView)
30 ActionModifyDelete::~ActionModifyDelete()
34 void ActionModifyDelete::init(int status)
36 ActionInterface::init(status);
40 void ActionModifyDelete::trigger()
42 DEBUG->print("ActionModifyDelete::trigger()");
43 Modification m(*container, graphicView);
47 if (DIALOGFACTORY != NULL)
48 DIALOGFACTORY->updateSelectionWidget(container->countSelected());
51 void ActionModifyDelete::updateMouseButtonHints()
53 if (DIALOGFACTORY != NULL)
58 // DIALOGFACTORY->updateMouseWidget(tr("Acknowledge"),
62 DIALOGFACTORY->updateMouseWidget("", "");
68 void ActionModifyDelete::updateMouseCursor()
70 graphicView->setMouseCursor(RS2::DelCursor);
73 void ActionModifyDelete::updateToolBar()
75 if (DIALOGFACTORY != NULL)
78 DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
80 DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);