OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pathgridmode.hpp
Go to the documentation of this file.
1 #ifndef CSV_RENDER_PATHGRIDMODE_H
2 #define CSV_RENDER_PATHGRIDMODE_H
3 
4 #include <string>
5 
6 #include "editmode.hpp"
7 
8 namespace CSVRender
9 {
10  class PathgridSelectionMode;
11 
12  class PathgridMode : public EditMode
13  {
14  Q_OBJECT
15 
16  public:
17 
18  PathgridMode(WorldspaceWidget* worldspace, QWidget* parent=0);
19 
20  virtual void activate(CSVWidget::SceneToolbar* toolbar);
21 
22  virtual void deactivate(CSVWidget::SceneToolbar* toolbar);
23 
24  virtual void primaryEditPressed(const WorldspaceHitResult& hit);
25 
26  virtual void secondaryEditPressed(const WorldspaceHitResult& hit);
27 
28  virtual void primarySelectPressed(const WorldspaceHitResult& hit);
29 
30  virtual void secondarySelectPressed(const WorldspaceHitResult& hit);
31 
32  virtual bool primaryEditStartDrag (const QPoint& pos);
33 
34  virtual bool secondaryEditStartDrag (const QPoint& pos);
35 
36  virtual void drag (const QPoint& pos, int diffX, int diffY, double speedFactor);
37 
38  virtual void dragCompleted(const QPoint& pos);
39 
42  virtual void dragAborted();
43 
44  private:
45 
46  enum DragMode
47  {
51  };
52 
54  std::string mLastId, mEdgeId;
55  unsigned short mFromNode;
56 
58 
59  QString getTooltip();
60  };
61 }
62 
63 #endif
Definition: pathgridmode.hpp:12
virtual void dragAborted()
Definition: pathgridmode.cpp:271
Definition: worldspacewidget.hpp:48
virtual void primaryEditPressed(const WorldspaceHitResult &hit)
Default-implementation: Ignored.
Definition: pathgridmode.cpp:66
std::string mLastId
Definition: pathgridmode.hpp:54
unsigned short mFromNode
Definition: pathgridmode.hpp:55
virtual void secondarySelectPressed(const WorldspaceHitResult &hit)
Default-implementation: Ignored.
Definition: pathgridmode.cpp:119
virtual void activate(CSVWidget::SceneToolbar *toolbar)
Default-Implementation: do nothing.
Definition: pathgridmode.cpp:45
virtual void secondaryEditPressed(const WorldspaceHitResult &hit)
Default-implementation: Ignored.
Definition: pathgridmode.cpp:84
virtual void dragCompleted(const QPoint &pos)
Default-implementation: ignored.
Definition: pathgridmode.cpp:225
Definition: worldspacewidget.hpp:40
virtual void primarySelectPressed(const WorldspaceHitResult &hit)
Default-implementation: Ignored.
Definition: pathgridmode.cpp:104
Definition: pathgridselectionmode.hpp:8
virtual void drag(const QPoint &pos, int diffX, int diffY, double speedFactor)
Default-implementation: ignored.
Definition: pathgridmode.cpp:184
DragMode
Definition: pathgridmode.hpp:46
virtual void deactivate(CSVWidget::SceneToolbar *toolbar)
Default-Implementation: do nothing.
Definition: pathgridmode.cpp:56
Definition: pathgridmode.hpp:50
PathgridMode(WorldspaceWidget *worldspace, QWidget *parent=0)
Definition: pathgridmode.cpp:25
Definition: pathgridmode.hpp:48
QString getTooltip()
Definition: pathgridmode.cpp:34
PathgridSelectionMode * mSelectionMode
Definition: pathgridmode.hpp:57
std::string mEdgeId
Definition: pathgridmode.hpp:54
DragMode mDragMode
Definition: pathgridmode.hpp:53
Definition: scenetoolbar.hpp:12
virtual bool primaryEditStartDrag(const QPoint &pos)
Definition: pathgridmode.cpp:141
Definition: pathgridmode.hpp:49
virtual bool secondaryEditStartDrag(const QPoint &pos)
Definition: pathgridmode.cpp:165
Definition: editmode.hpp:19