]> Shamusworld >> Repos - architektonas/blob - src/actions/actionselectbase.cpp
cefd57ef05c52d1c463c5eb7c5d1957860e85305
[architektonas] / src / actions / actionselectbase.cpp
1 // actionselectbase.cpp
2 //
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
7 //
8 // JLH = James L. Hammons <jlhamm@acm.org>
9 //
10 // Who  When        What
11 // ---  ----------  -----------------------------------------------------------
12 // JLH  06/04/2010  Added this text. :-)
13 //
14
15 #include "actionselectbase.h"
16
17 #include "graphicview.h"
18
19 ActionSelectBase::ActionSelectBase(const char * name,
20         RS_EntityContainer & container, GraphicView & graphicView):
21         ActionInterface(name, container, graphicView)
22 {
23 }
24
25 ActionSelectBase::~ActionSelectBase()
26 {
27 }
28
29 /**
30  * Default behaviour of this method is triggering the predecesing
31  * action and finishing this one when the enter key is pressed.
32  */
33 void ActionSelectBase::keyReleaseEvent(QKeyEvent * e)
34 {
35         if (e->key() == Qt::Key_Return && predecessor)
36                 finish();
37 }
38
39 void ActionSelectBase::updateMouseCursor()
40 {
41         graphicView->setMouseCursor(RS2::SelectCursor);
42 }