Open Source 2D CAD
Go to the documentation of this file.
23 #include "core_global.h"
24 #include "RAction.h"
25 #include "RVector.h"
26 #include "RDebug.h"
27 #include "REntity.h"
29 class RPropertyEvent;
30 class RGraphicsScene;
31 class RDocumentInterface;
32 class RCommandEvent;
33 class RCoordinateEvent;
34 class RDocument;
35 class REntityPickEvent;
36 class RMouseEvent;
37 class RWheelEvent;
38 class RGuiAction;
39 class RStorage;
40 class RTabletEvent;
41 class ROperation;
54 public:
55  RActionAdapter(RGuiAction* guiAction=NULL) : RAction(guiAction) {
56 // qDebug() << "RActionAdapter " << QString("0x%1").arg((int)this, 0, 16);
57  }
58  virtual ~RActionAdapter() {
59 // qDebug() << "~RActionAdapter " << QString("0x%1").arg((int)this, 0, 16);
60  }
61  virtual void beginEvent() {}
62  virtual void setGraphicsView(RGraphicsView* /*view*/) {}
63  virtual void finishEvent() {}
64  virtual void suspendEvent() {}
65  virtual void resumeEvent() {}
66  virtual void escapeEvent() {}
67  virtual void keyPressEvent(QKeyEvent& /*event*/) {}
68  virtual void keyReleaseEvent(QKeyEvent& /*event*/) {}
69  virtual void mousePressEvent(RMouseEvent& /*event*/) {}
70  virtual void mouseMoveEvent(RMouseEvent& /*event*/) {}
71  virtual void mouseReleaseEvent(RMouseEvent& /*event*/) {}
72  virtual void mouseDoubleClickEvent(RMouseEvent& /*event*/) {}
73  virtual void wheelEvent(RWheelEvent& /*event*/) {}
74  virtual void tabletEvent(RTabletEvent& /*event*/) {}
75  virtual void swipeGestureEvent(QSwipeGesture& /*gesture*/) {}
76  virtual void panGestureEvent(QPanGesture& /*gesture*/) {}
77  virtual void pinchGestureEvent(QPinchGesture& /*gesture*/) {}
78  virtual void commandEvent(RCommandEvent& /*event*/) {}
79  virtual void commandEventPreview(RCommandEvent& /*event*/) {}
80  virtual void coordinateEvent(RCoordinateEvent& /*event*/) {}
81  virtual void coordinateEventPreview(RCoordinateEvent& /*event*/) {}
82  virtual void entityPickEvent(REntityPickEvent& /*event*/) {}
83  virtual void entityPickEventPreview(REntityPickEvent& /*event)*/) {}
84  virtual void propertyChangeEvent(RPropertyEvent& /*event*/) {}
85  //virtual void setMultiSnapPoints(const QList<RVector>& /*points*/) {}
86  //virtual void setMultiSnapAngles(const QList<double>& /*angles*/) {}
87  virtual void updatePreview() {}
88  virtual void applyOperation() {}
89 };
93 #endif
virtual void entityPickEvent(REntityPickEvent &)
Definition: RActionAdapter.h:82
This abstract class is an interface for all operation implementations.
Definition: ROperation.h:44
virtual void panGestureEvent(QPanGesture &)
Called on pan gesture events.
Definition: RActionAdapter.h:76
virtual void mouseDoubleClickEvent(RMouseEvent &)
Called on mouse double click events.
Definition: RActionAdapter.h:72
Abstract base class for all action classes.
Definition: RActionAdapter.h:53
virtual void mouseMoveEvent(RMouseEvent &)
Called on mouse move events.
Definition: RActionAdapter.h:70
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RCommandEvent.h:31
A tablet event for a graphics scene.
Definition: RTabletEvent.h:43
virtual void propertyChangeEvent(RPropertyEvent &)
Called when the value of a property is modified while this action is active.
Definition: RActionAdapter.h:84
virtual void applyOperation()
Definition: RActionAdapter.h:88
virtual void resumeEvent()
Resumes the action (for example when another action became active and then terminated or if the mouse...
Definition: RActionAdapter.h:65
Abstract base class for all graphics scenes.
Definition: RGraphicsScene.h:60
virtual void commandEvent(RCommandEvent &)
Called when a command is entered in the command line.
Definition: RActionAdapter.h:78
virtual void beginEvent()
Called as soon as the action is created (menu chosen, toolbutton activated, etc). ...
Definition: RActionAdapter.h:61
virtual void updatePreview()
Definition: RActionAdapter.h:87
Definition: core_global.h:10
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RPropertyEvent.h:40
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RStorage.h:55
virtual void swipeGestureEvent(QSwipeGesture &)
Called on swipe gesture events.
Definition: RActionAdapter.h:75
virtual ~RActionAdapter()
Definition: RActionAdapter.h:58
Entity pick event.
Definition: REntityPickEvent.h:38
virtual void commandEventPreview(RCommandEvent &)
Called when a command is being edited in the command line.
Definition: RActionAdapter.h:79
virtual void tabletEvent(RTabletEvent &)
Called on tablet events.
Definition: RActionAdapter.h:74
virtual void setGraphicsView(RGraphicsView *)
Called if this action is set as a navigation action of a graphics view.
Definition: RActionAdapter.h:62
virtual void finishEvent()
Called just before the action is deleted.
Definition: RActionAdapter.h:63
Abstract base class for all action classes.
Definition: RAction.h:62
A graphics document contains and owns entities, layers, user coordinate systems, variables, block definitions, etc.
Definition: RDocument.h:63
A mouse event for a graphics scene.
Definition: RMouseEvent.h:42
virtual void suspendEvent()
Called with the action is Suspended, for example when another action becomes active or the mouse curs...
Definition: RActionAdapter.h:64
virtual void mousePressEvent(RMouseEvent &)
Called on mouse press events.
Definition: RActionAdapter.h:69
virtual void entityPickEventPreview(REntityPickEvent &)
Definition: RActionAdapter.h:83
virtual void escapeEvent()
Escape events are triggered if the user clicks the right mouse button or hits the Escape key...
Definition: RActionAdapter.h:66
RActionAdapter(RGuiAction *guiAction=NULL)
Definition: RActionAdapter.h:55
Abstract base class for GUI action classes.
Definition: RGuiAction.h:60
Interface for interaction between a graphics document and a user.
Definition: RDocumentInterface.h:82
virtual void wheelEvent(RWheelEvent &)
Called on mouse wheel events.
Definition: RActionAdapter.h:73
virtual void coordinateEventPreview(RCoordinateEvent &)
Called if the action is in PickCoordinate mode and the mouse is moved around.
Definition: RActionAdapter.h:81
virtual void keyReleaseEvent(QKeyEvent &)
Definition: RActionAdapter.h:68
virtual void mouseReleaseEvent(RMouseEvent &)
Called on mouse release events.
Definition: RActionAdapter.h:71
virtual void coordinateEvent(RCoordinateEvent &)
Called for every coordinate event.
Definition: RActionAdapter.h:80
virtual void pinchGestureEvent(QPinchGesture &)
Called on pinch gesture events.
Definition: RActionAdapter.h:77
A mouse wheel event for a graphics scene.
Definition: RWheelEvent.h:41
virtual void keyPressEvent(QKeyEvent &)
Definition: RActionAdapter.h:67
Coordinate Event.
Definition: RCoordinateEvent.h:37
Graphics view.
Definition: RGraphicsView.h:58