1 // actionselectsingle.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 "actionselectsingle.h"
20 #include "dialogfactory.h"
21 #include "graphicview.h"
22 #include "selection.h"
24 ActionSelectSingle::ActionSelectSingle(EntityContainer & container, GraphicView & graphicView):
25 ActionInterface("Select Entities", container, graphicView)
30 ActionSelectSingle::~ActionSelectSingle()
34 /*virtual*/ RS2::ActionType ActionSelectSingle::rtti()
36 return RS2::ActionSelectSingle;
39 void ActionSelectSingle::trigger()
43 Selection s(*container, graphicView);
46 DIALOGFACTORY->updateSelectionWidget(container->countSelected());
49 DEBUG->print("ActionSelectSingle::trigger: Entity is NULL\n");
52 void ActionSelectSingle::keyPressEvent(QKeyEvent * e)
54 if (e->key() == Qt::Key_Enter)
58 void ActionSelectSingle::mouseReleaseEvent(QMouseEvent * e)
60 if (e->button() == Qt::RightButton)
61 init(getStatus() - 1);
69 void ActionSelectSingle::updateMouseCursor()
71 graphicView->setMouseCursor(RS2::SelectCursor);