1 // actionselectcontour.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 "actionselectcontour.h"
20 #include "dialogfactory.h"
21 #include "graphicview.h"
22 #include "selection.h"
24 ActionSelectContour::ActionSelectContour(EntityContainer & container,
25 GraphicView & graphicView):
26 ActionInterface("Select Contours", container, graphicView)
31 ActionSelectContour::~ActionSelectContour()
35 /*virtual*/ RS2::ActionType ActionSelectContour::rtti()
37 return RS2::ActionSelectContour;
40 void ActionSelectContour::trigger()
46 Selection s(*container, graphicView);
50 DIALOGFACTORY->updateSelectionWidget(container->countSelected());
52 else if (DIALOGFACTORY)
53 DIALOGFACTORY->commandMessage(tr("Entity must be an Atomic Entity."));
56 DEBUG->print("ActionSelectContour::trigger: Entity is NULL\n");
59 void ActionSelectContour::mouseReleaseEvent(QMouseEvent * e)
61 if (e->button() == Qt::RightButton)
62 init(getStatus() - 1);
70 void ActionSelectContour::updateMouseCursor()
72 graphicView->setMouseCursor(RS2::SelectCursor);