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 // (C) 2010 Underground Software
8 // JLH = James L. Hammons <jlhamm@acm.org>
11 // --- ---------- -----------------------------------------------------------
12 // JLH 06/05/2010 Added this text. :-)
15 #include "actionselectsingle.h"
17 #include "rs_dialogfactory.h"
18 #include "rs_selection.h"
20 ActionSelectSingle::ActionSelectSingle(RS_EntityContainer & container, GraphicView & graphicView):
21 ActionInterface("Select Entities", container, graphicView)
26 ActionSelectSingle::~ActionSelectSingle()
30 /*virtual*/ RS2::ActionType ActionSelectSingle::rtti()
32 return RS2::ActionSelectSingle;
35 void ActionSelectSingle::trigger()
39 RS_Selection s(*container, graphicView);
42 RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
45 RS_DEBUG->print("ActionSelectSingle::trigger: Entity is NULL\n");
48 void ActionSelectSingle::keyPressEvent(QKeyEvent * e)
50 if (e->key() == Qt::Key_Enter)
54 void ActionSelectSingle::mouseReleaseEvent(QMouseEvent * e)
56 if (e->button() == Qt::RightButton)
57 init(getStatus() - 1);
65 void ActionSelectSingle::updateMouseCursor()
67 graphicView->setMouseCursor(RS2::SelectCursor);