CEDRIC  Revision_backup-2009-02
EventCameraWidget.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright (C) 2008 Boris Iven, Max Hermann
4  *
5  * This file is part of the "CEDRIC Event Display" application.
6  *
7  *****************************************************************************/
8 
9 #ifndef EVENTCAMERAWIDGET_H
10 #define EVENTCAMERAWIDGET_H
11 
12 #include "MyCameraWidget.h"
13 #include <osg/ref_ptr>
14 #include <osg/MatrixTransform>
15 class osg::Node;
16 #include <QPoint>
17 class QMouseEvent;
18 class QWheelEvent;
19 class QWidget;
20 
23 {
24  Q_OBJECT
25 
26 public:
27  EventCameraWidget( QWidget* parent = 0 );
28  virtual ~EventCameraWidget() {}
29 
31  virtual void setSceneData( osg::Node* node );
32 
33 protected:
35  virtual void mouseMoveEvent ( QMouseEvent* event );
37  virtual void mousePressEvent ( QMouseEvent* event );
38  virtual void mouseReleaseEvent( QMouseEvent* event );
39  virtual void wheelEvent ( QWheelEvent* event );
41 
42 private:
43  QPoint mousePos;
44  osg::ref_ptr<osg::MatrixTransform> _rotNode;
45  float m_rotx,m_roty;
46 };
47 
48 #endif
virtual void mouseMoveEvent(QMouseEvent *event)
Override Qt mouse events (extend MyCameraWidget implementation)
Definition: EventCameraWidget.cpp:35
Change ROTATE mouse mode of MyCameraWidget.
Definition: EventCameraWidget.h:22
virtual void mousePressEvent(QMouseEvent *event)
Definition: EventCameraWidget.cpp:66
EventCameraWidget(QWidget *parent=0)
Definition: EventCameraWidget.cpp:20
virtual void wheelEvent(QWheelEvent *event)
Definition: EventCameraWidget.cpp:92
virtual void mouseReleaseEvent(QMouseEvent *event)
Definition: EventCameraWidget.cpp:79
virtual void setSceneData(osg::Node *node)
Override to append rotation node.
Definition: EventCameraWidget.cpp:26
virtual ~EventCameraWidget()
Definition: EventCameraWidget.h:28
Viewer based on MyCamera providing Trackball rotation, Rubberband zoom and Picking.
Definition: MyCameraWidget.h:27