1 // rs_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 "rs_actionselectcontour.h"
17 #include "rs_dialogfactory.h"
18 #include "rs_selection.h"
20 RS_ActionSelectContour::RS_ActionSelectContour(RS_EntityContainer & container,
21 GraphicView & graphicView):
22 RS_ActionInterface("Select Contours", container, graphicView)
27 RS_ActionSelectContour::~RS_ActionSelectContour()
31 /*virtual*/ RS2::ActionType RS_ActionSelectContour::rtti()
33 return RS2::ActionSelectContour;
36 void RS_ActionSelectContour::trigger()
42 RS_Selection s(*container, graphicView);
45 if (RS_DIALOGFACTORY != NULL)
46 RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
48 else if (RS_DIALOGFACTORY != NULL)
49 RS_DIALOGFACTORY->commandMessage(
50 tr("Entity must be an Atomic Entity."));
54 RS_DEBUG->print("RS_ActionSelectContour::trigger: Entity is NULL\n");
57 void RS_ActionSelectContour::mouseReleaseEvent(QMouseEvent * e)
59 if (e->button() == Qt::RightButton)
60 init(getStatus() - 1);
68 void RS_ActionSelectContour::updateMouseCursor()
70 graphicView->setMouseCursor(RS2::SelectCursor);