OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
editmode.hpp
Go to the documentation of this file.
1 #ifndef CSV_RENDER_EDITMODE_H
2 #define CSV_RENDER_EDITMODE_H
3 
4 #include <osg/ref_ptr>
5 
6 #include "../widget/modebutton.hpp"
7 
8 class QDragEnterEvent;
9 class QDropEvent;
10 class QDragMoveEvent;
11 class QPoint;
12 
13 namespace CSVRender
14 {
15  class WorldspaceWidget;
16  struct WorldspaceHitResult;
17  class TagBase;
18 
20  {
21  Q_OBJECT
22 
24  unsigned int mMask;
25 
26  protected:
27 
29 
30  public:
31 
32  EditMode (WorldspaceWidget *worldspaceWidget, const QIcon& icon, unsigned int mask,
33  const QString& tooltip = "", QWidget *parent = 0);
34 
35  unsigned int getInteractionMask() const;
36 
37  virtual void activate (CSVWidget::SceneToolbar *toolbar);
38 
40  virtual void setEditLock (bool locked);
41 
43  virtual void primaryEditPressed (const WorldspaceHitResult& hit);
44 
46  virtual void secondaryEditPressed (const WorldspaceHitResult& hit);
47 
49  virtual void primarySelectPressed (const WorldspaceHitResult& hit);
50 
52  virtual void secondarySelectPressed (const WorldspaceHitResult& hit);
53 
57  virtual bool primaryEditStartDrag (const QPoint& pos);
58 
62  virtual bool secondaryEditStartDrag (const QPoint& pos);
63 
67  virtual bool primarySelectStartDrag (const QPoint& pos);
68 
72  virtual bool secondarySelectStartDrag (const QPoint& pos);
73 
75  virtual void drag (const QPoint& pos, int diffX, int diffY, double speedFactor);
76 
78  virtual void dragCompleted(const QPoint& pos);
79 
84  virtual void dragAborted();
85 
87  virtual void dragWheel (int diff, double speedFactor);
88 
90  virtual void dragEnterEvent (QDragEnterEvent *event);
91 
93  virtual void dropEvent (QDropEvent *event);
94 
96  virtual void dragMoveEvent (QDragMoveEvent *event);
97 
99  virtual int getSubMode() const;
100  };
101 }
102 
103 #endif
virtual void primaryEditPressed(const WorldspaceHitResult &hit)
Default-implementation: Ignored.
Definition: editmode.cpp:32
Definition: worldspacewidget.hpp:48
virtual bool secondaryEditStartDrag(const QPoint &pos)
Definition: editmode.cpp:45
virtual int getSubMode() const
Default: return -1.
Definition: editmode.cpp:74
virtual void secondarySelectPressed(const WorldspaceHitResult &hit)
Default-implementation: Ignored.
Definition: editmode.cpp:38
virtual void dragEnterEvent(QDragEnterEvent *event)
Default-implementation: ignored.
Definition: editmode.cpp:68
virtual bool secondarySelectStartDrag(const QPoint &pos)
Definition: editmode.cpp:55
virtual bool primaryEditStartDrag(const QPoint &pos)
Definition: editmode.cpp:40
unsigned int mMask
Definition: editmode.hpp:24
unsigned int getInteractionMask() const
Definition: editmode.cpp:16
Specialist PushButton of Type_Mode for use in SceneToolMode.
Definition: modebutton.hpp:13
virtual void setEditLock(bool locked)
Default-implementation: Ignored.
Definition: editmode.cpp:27
Definition: worldspacewidget.hpp:40
WorldspaceWidget & getWorldspaceWidget()
Definition: editmode.cpp:6
virtual void activate(CSVWidget::SceneToolbar *toolbar)
Default-Implementation: do nothing.
Definition: editmode.cpp:21
virtual void primarySelectPressed(const WorldspaceHitResult &hit)
Default-implementation: Ignored.
Definition: editmode.cpp:36
EditMode(WorldspaceWidget *worldspaceWidget, const QIcon &icon, unsigned int mask, const QString &tooltip="", QWidget *parent=0)
Definition: editmode.cpp:11
virtual void secondaryEditPressed(const WorldspaceHitResult &hit)
Default-implementation: Ignored.
Definition: editmode.cpp:34
virtual void dropEvent(QDropEvent *event)
Default-implementation: ignored.
Definition: editmode.cpp:70
virtual void dragCompleted(const QPoint &pos)
Default-implementation: ignored.
Definition: editmode.cpp:62
WorldspaceWidget * mWorldspaceWidget
Definition: editmode.hpp:23
virtual void drag(const QPoint &pos, int diffX, int diffY, double speedFactor)
Default-implementation: ignored.
Definition: editmode.cpp:60
virtual void dragAborted()
Definition: editmode.cpp:64
Definition: scenetoolbar.hpp:12
virtual void dragWheel(int diff, double speedFactor)
Default-implementation: ignored.
Definition: editmode.cpp:66
virtual void dragMoveEvent(QDragMoveEvent *event)
Default-implementation: ignored.
Definition: editmode.cpp:72
virtual bool primarySelectStartDrag(const QPoint &pos)
Definition: editmode.cpp:50
Definition: editmode.hpp:19