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 // (C) 2010 Underground Software
8 // JLH = James L. Hammons <jlhamm@acm.org>
11 // --- ---------- -----------------------------------------------------------
12 // JLH 06/04/2010 Added this text. :-)
15 #include "actionselectcontour.h"
17 #include "rs_dialogfactory.h"
18 #include "rs_selection.h"
20 ActionSelectContour::ActionSelectContour(RS_EntityContainer & container,
21 GraphicView & graphicView):
22 ActionInterface("Select Contours", container, graphicView)
27 ActionSelectContour::~ActionSelectContour()
31 /*virtual*/ RS2::ActionType ActionSelectContour::rtti()
33 return RS2::ActionSelectContour;
36 void ActionSelectContour::trigger()
42 RS_Selection s(*container, graphicView);
46 RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
48 else if (RS_DIALOGFACTORY)
49 RS_DIALOGFACTORY->commandMessage(tr("Entity must be an Atomic Entity."));
52 RS_DEBUG->print("ActionSelectContour::trigger: Entity is NULL\n");
55 void ActionSelectContour::mouseReleaseEvent(QMouseEvent * e)
57 if (e->button() == Qt::RightButton)
58 init(getStatus() - 1);
66 void ActionSelectContour::updateMouseCursor()
68 graphicView->setMouseCursor(RS2::SelectCursor);