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"
19 #include "rs_dialogfactory.h"
20 #include "rs_selection.h"
22 ActionSelectSingle::ActionSelectSingle(RS_EntityContainer & container, GraphicView & graphicView):
23 ActionInterface("Select Entities", container, graphicView)
28 ActionSelectSingle::~ActionSelectSingle()
32 /*virtual*/ RS2::ActionType ActionSelectSingle::rtti()
34 return RS2::ActionSelectSingle;
37 void ActionSelectSingle::trigger()
41 RS_Selection s(*container, graphicView);
44 RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
47 RS_DEBUG->print("ActionSelectSingle::trigger: Entity is NULL\n");
50 void ActionSelectSingle::keyPressEvent(QKeyEvent * e)
52 if (e->key() == Qt::Key_Enter)
56 void ActionSelectSingle::mouseReleaseEvent(QMouseEvent * e)
58 if (e->button() == Qt::RightButton)
59 init(getStatus() - 1);
67 void ActionSelectSingle::updateMouseCursor()
69 graphicView->setMouseCursor(RS2::SelectCursor);