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"
19 #include "rs_dialogfactory.h"
20 #include "rs_selection.h"
22 ActionSelectContour::ActionSelectContour(RS_EntityContainer & container,
23 GraphicView & graphicView):
24 ActionInterface("Select Contours", container, graphicView)
29 ActionSelectContour::~ActionSelectContour()
33 /*virtual*/ RS2::ActionType ActionSelectContour::rtti()
35 return RS2::ActionSelectContour;
38 void ActionSelectContour::trigger()
44 RS_Selection s(*container, graphicView);
48 RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
50 else if (RS_DIALOGFACTORY)
51 RS_DIALOGFACTORY->commandMessage(tr("Entity must be an Atomic Entity."));
54 RS_DEBUG->print("ActionSelectContour::trigger: Entity is NULL\n");
57 void ActionSelectContour::mouseReleaseEvent(QMouseEvent * e)
59 if (e->button() == Qt::RightButton)
60 init(getStatus() - 1);
68 void ActionSelectContour::updateMouseCursor()
70 graphicView->setMouseCursor(RS2::SelectCursor);