1 // 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 // 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/05/2010 Added this text. :-)
17 #include "actionselectlayer.h"
20 #include "dialogfactory.h"
21 #include "graphicview.h"
22 #include "selection.h"
24 ActionSelectLayer::ActionSelectLayer(EntityContainer & container, GraphicView & graphicView):
25 ActionInterface("Select Layers", container, graphicView)
30 ActionSelectLayer::~ActionSelectLayer()
34 /*virtual*/ RS2::ActionType ActionSelectLayer::rtti()
36 return RS2::ActionSelectLayer;
39 void ActionSelectLayer::trigger()
43 Selection s(*container, graphicView);
47 DIALOGFACTORY->updateSelectionWidget(container->countSelected());
50 DEBUG->print("ActionSelectLayer::trigger: Entity is NULL\n");
53 void ActionSelectLayer::mouseReleaseEvent(QMouseEvent * e)
55 if (e->button() == Qt::RightButton)
56 init(getStatus() - 1);
64 void ActionSelectLayer::updateMouseCursor()
66 graphicView->setMouseCursor(RS2::SelectCursor);