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 enterEvent() {}
65  virtual void suspendEvent() {}
66  virtual void resumeEvent() {}
67  virtual void escapeEvent() {}
68  virtual void keyPressEvent(QKeyEvent& /*event*/) {}
69  virtual void keyReleaseEvent(QKeyEvent& /*event*/) {}
70  virtual void mousePressEvent(RMouseEvent& /*event*/) {}
71  virtual void mouseMoveEvent(RMouseEvent& /*event*/) {}
72  virtual void mouseReleaseEvent(RMouseEvent& /*event*/) {}
73  virtual void mouseDoubleClickEvent(RMouseEvent& /*event*/) {}
74  virtual void wheelEvent(RWheelEvent& /*event*/) {}
75  virtual void tabletEvent(RTabletEvent& /*event*/) {}
76  virtual void swipeGestureEvent(QSwipeGesture& /*gesture*/) {}
77  virtual void panGestureEvent(QPanGesture& /*gesture*/) {}
78  virtual void pinchGestureEvent(QPinchGesture& /*gesture*/) {}
79  virtual void commandEvent(RCommandEvent& /*event*/) {}
80  virtual void commandEventPreview(RCommandEvent& /*event*/) {}
81  virtual void coordinateEvent(RCoordinateEvent& /*event*/) {}
82  virtual void coordinateEventPreview(RCoordinateEvent& /*event*/) {}
83  virtual void entityPickEvent(REntityPickEvent& /*event*/) {}
84  virtual void entityPickEventPreview(REntityPickEvent& /*event)*/) {}
85  virtual void propertyChangeEvent(RPropertyEvent& /*event*/) {}
86  virtual void zoomChangeEvent(RGraphicsView& /*view*/) {}
87  //virtual void setMultiSnapPoints(const QList<RVector>& /*points*/) {}
88  //virtual void setMultiSnapAngles(const QList<double>& /*angles*/) {}
89  virtual void updatePreview() {}
90  virtual void applyOperation() {}
91 };
95 #endif
virtual void entityPickEvent(REntityPickEvent &)
Definition: RActionAdapter.h:83
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:77
virtual void mouseDoubleClickEvent(RMouseEvent &)
Called on mouse double click events.
Definition: RActionAdapter.h:73
Abstract base class for all action classes.
Definition: RActionAdapter.h:53
virtual void mouseMoveEvent(RMouseEvent &)
Called on mouse move events.
Definition: RActionAdapter.h:71
Copyright (c) 2011-2018 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:85
virtual void applyOperation()
Definition: RActionAdapter.h:90
virtual void resumeEvent()
Resumes the action (for example when another action became active and then terminated or if the mouse...
Definition: RActionAdapter.h:66
Abstract base class for all graphics scenes.
Definition: RGraphicsScene.h:61
virtual void commandEvent(RCommandEvent &)
Called when a command is entered in the command line.
Definition: RActionAdapter.h:79
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:89
Definition: core_global.h:10
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RPropertyEvent.h:40
This is the abstract base class for all storage implementations.
Definition: RStorage.h:63
virtual void swipeGestureEvent(QSwipeGesture &)
Called on swipe gesture events.
Definition: RActionAdapter.h:76
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:80
virtual void tabletEvent(RTabletEvent &)
Called on tablet events.
Definition: RActionAdapter.h:75
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:67
virtual void enterEvent()
Called when user presses enter (e.g.
Definition: RActionAdapter.h:64
A mouse event for a graphics scene.
Definition: RMouseEvent.h:42
virtual void suspendEvent()
Called when the action is suspended, for example when another action becomes active or the mouse curs...
Definition: RActionAdapter.h:65
virtual void mousePressEvent(RMouseEvent &)
Called on mouse press events.
Definition: RActionAdapter.h:70
virtual void entityPickEventPreview(REntityPickEvent &)
Definition: RActionAdapter.h:84
virtual void escapeEvent()
Escape events are triggered if the user clicks the right mouse button or hits the Escape key...
Definition: RActionAdapter.h:67
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:84
virtual void wheelEvent(RWheelEvent &)
Called on mouse wheel events.
Definition: RActionAdapter.h:74
virtual void coordinateEventPreview(RCoordinateEvent &)
Called if the action is in PickCoordinate mode and the mouse is moved around.
Definition: RActionAdapter.h:82
virtual void zoomChangeEvent(RGraphicsView &)
Called when the zoom factor or offset changed in the given view.
Definition: RActionAdapter.h:86
virtual void keyReleaseEvent(QKeyEvent &)
Definition: RActionAdapter.h:69
virtual void mouseReleaseEvent(RMouseEvent &)
Called on mouse release events.
Definition: RActionAdapter.h:72
virtual void coordinateEvent(RCoordinateEvent &)
Called for every coordinate event.
Definition: RActionAdapter.h:81
virtual void pinchGestureEvent(QPinchGesture &)
Called on pinch gesture events.
Definition: RActionAdapter.h:78
A mouse wheel event for a graphics scene.
Definition: RWheelEvent.h:41
virtual void keyPressEvent(QKeyEvent &)
Definition: RActionAdapter.h:68
Coordinate Event.
Definition: RCoordinateEvent.h:37
Graphics view.
Definition: RGraphicsView.h:58