1 // rs_actionselectlayer.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/05/2010 Added this text. :-)
15 #include "rs_actionselectlayer.h"
17 #include "rs_dialogfactory.h"
18 #include "rs_selection.h"
20 RS_ActionSelectLayer::RS_ActionSelectLayer(RS_EntityContainer & container, GraphicView & graphicView):
21 RS_ActionInterface("Select Layers", container, graphicView)
26 RS_ActionSelectLayer::~RS_ActionSelectLayer()
30 /*virtual*/ RS2::ActionType RS_ActionSelectLayer::rtti()
32 return RS2::ActionSelectLayer;
35 void RS_ActionSelectLayer::trigger()
39 RS_Selection s(*container, graphicView);
42 if (RS_DIALOGFACTORY != NULL)
43 RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
46 RS_DEBUG->print("RS_ActionSelectLayer::trigger: Entity is NULL\n");
49 void RS_ActionSelectLayer::mouseReleaseEvent(QMouseEvent * e)
51 if (e->button() == Qt::RightButton)
52 init(getStatus() - 1);
60 void RS_ActionSelectLayer::updateMouseCursor()
62 graphicView->setMouseCursor(RS2::SelectCursor);