BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
interactionModeManager.h
Go to the documentation of this file.
1 #ifndef BALL_VIEW_KERNEL_MODES_MODEMANAGER_H
2 #define BALL_VIEW_KERNEL_MODES_MODEMANAGER_H
3 
4 #ifndef BALL_VIEW_RENDERING_RENDERERS_RENDERER_H
6 #endif
7 
8 #include <list>
9 
10 #include <QtCore/QObject>
11 
12 class QAction;
13 class QMenu;
14 class QActionGroup;
15 class QKeyEvent;
16 class QMouseEvent;
17 class QWheelEvent;
18 class QToolBar;
19 
20 namespace BALL
21 {
22  namespace VIEW
23  {
24  class InteractionMode;
25  class Scene;
26 
28  {
29  Q_OBJECT
30 
31  public:
33  void init();
34 
35  QString getCurrentModeName() const;
36 
37  virtual void keyPressEvent(QKeyEvent* evt);
38  virtual void keyReleaseEvent(QKeyEvent* evt);
39 
40  virtual void mouseDoubleClickEvent(QMouseEvent* evt);
41  virtual void mouseMoveEvent(QMouseEvent* evt);
42  virtual void mousePressEvent(QMouseEvent* evt);
43  virtual void mouseReleaseEvent(QMouseEvent* evt);
44 
45  virtual void wheelEvent(QWheelEvent* evt);
46 
47  virtual void addToolBarEntries(QToolBar* tb);
48  virtual void populateContextMenu(QMenu* menu);
49  void setStereoMode(bool stereo_mode);
50 
51  void switchToLastMode();
52 
53  protected slots:
54  void setMode_(InteractionMode* new_mode);
55 
56  protected:
60  QActionGroup* actions_;
61  std::list<InteractionMode*> modes_;
64 
65  bool handleStereoKeyPress_(QKeyEvent* evt);
66  };
67  }
68 }
69 
70 #endif //BALL_VIEW_KERNEL_MODES_MODEMANAGER_H
virtual void populateContextMenu(QMenu *menu)
virtual void keyReleaseEvent(QKeyEvent *evt)
virtual void mouseMoveEvent(QMouseEvent *evt)
virtual void mouseReleaseEvent(QMouseEvent *evt)
bool handleStereoKeyPress_(QKeyEvent *evt)
virtual void addToolBarEntries(QToolBar *tb)
virtual void wheelEvent(QWheelEvent *evt)
virtual void keyPressEvent(QKeyEvent *evt)
void setMode_(InteractionMode *new_mode)
virtual void mouseDoubleClickEvent(QMouseEvent *evt)
void setStereoMode(bool stereo_mode)
virtual void mousePressEvent(QMouseEvent *evt)
std::list< InteractionMode * > modes_