00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00023
00024 #ifndef _vtkQtChartMouseFunction_h
00025 #define _vtkQtChartMouseFunction_h
00026
00027
00028 #include "vtkQtChartExport.h"
00029 #include <QObject>
00030
00031 class vtkQtChartArea;
00032 class QCursor;
00033 class QMouseEvent;
00034 class QRectF;
00035 class QWheelEvent;
00036
00037
00042 class VTKQTCHART_EXPORT vtkQtChartMouseFunction : public QObject
00043 {
00044 Q_OBJECT
00045
00046 public:
00050 vtkQtChartMouseFunction(QObject *parent=0);
00051 virtual ~vtkQtChartMouseFunction() {}
00052
00063 virtual bool isCombinable() const {return true;}
00064
00069 bool isMouseOwner() const {return this->OwnsMouse;}
00070
00075
00076 virtual void setMouseOwner(bool owns) {this->OwnsMouse = owns;}
00077
00084 virtual bool mousePressEvent(QMouseEvent *e, vtkQtChartArea *chart)=0;
00085
00092 virtual bool mouseMoveEvent(QMouseEvent *e, vtkQtChartArea *chart)=0;
00093
00100 virtual bool mouseReleaseEvent(QMouseEvent *e, vtkQtChartArea *chart)=0;
00101
00108 virtual bool mouseDoubleClickEvent(QMouseEvent *e, vtkQtChartArea *chart)=0;
00109
00116 virtual bool wheelEvent(QWheelEvent *e, vtkQtChartArea *chart);
00117
00118 signals:
00127 void interactionStarted(vtkQtChartMouseFunction *function);
00128
00132 void interactionFinished(vtkQtChartMouseFunction *function);
00133
00137 void cursorChangeRequested(const QCursor &cursor);
00138
00139 private:
00140 bool OwnsMouse;
00141 };
00142
00143 #endif