00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00023
00024 #ifndef _vtkQtChartMouseZoom_h
00025 #define _vtkQtChartMouseZoom_h
00026
00027
00028 #include "vtkQtChartExport.h"
00029 #include "vtkQtChartMouseFunction.h"
00030
00031 class vtkQtChartArea;
00032 class vtkQtChartMouseZoomInternal;
00033 class QCursor;
00034 class QMouseEvent;
00035
00036
00041 class VTKQTCHART_EXPORT vtkQtChartMouseZoom : public vtkQtChartMouseFunction
00042 {
00043 public:
00044 enum ZoomFlags
00045 {
00046 ZoomBoth,
00047 ZoomXOnly,
00048 ZoomYOnly
00049 };
00050
00051 public:
00055 vtkQtChartMouseZoom(QObject *parent=0);
00056 virtual ~vtkQtChartMouseZoom();
00057
00059
00060 virtual void setMouseOwner(bool owns);
00061
00062 virtual bool mousePressEvent(QMouseEvent *e, vtkQtChartArea *chart);
00063 virtual bool mouseMoveEvent(QMouseEvent *e, vtkQtChartArea *chart);
00064 virtual bool mouseReleaseEvent(QMouseEvent *e, vtkQtChartArea *chart);
00065 virtual bool mouseDoubleClickEvent(QMouseEvent *e, vtkQtChartArea *chart);
00066 virtual bool wheelEvent(QWheelEvent *e, vtkQtChartArea *chart);
00068
00073 ZoomFlags getFlags() const {return this->Flags;}
00074
00075 protected:
00079 void setFlags(ZoomFlags flags) {this->Flags = flags;}
00080
00081 private:
00082 vtkQtChartMouseZoomInternal *Internal;
00083 ZoomFlags Flags;
00084
00085 private:
00086 vtkQtChartMouseZoom(const vtkQtChartMouseZoom &);
00087 vtkQtChartMouseZoom &operator=(const vtkQtChartMouseZoom &);
00088 };
00089
00090
00094 class VTKQTCHART_EXPORT vtkQtChartMouseZoomX : public vtkQtChartMouseZoom
00095 {
00096 public:
00100 vtkQtChartMouseZoomX(QObject *parent=0);
00101 virtual ~vtkQtChartMouseZoomX() {}
00102
00103 private:
00104 vtkQtChartMouseZoomX(const vtkQtChartMouseZoomX &);
00105 vtkQtChartMouseZoomX &operator=(const vtkQtChartMouseZoomX &);
00106 };
00107
00108
00112 class VTKQTCHART_EXPORT vtkQtChartMouseZoomY : public vtkQtChartMouseZoom
00113 {
00114 public:
00118 vtkQtChartMouseZoomY(QObject *parent=0);
00119 virtual ~vtkQtChartMouseZoomY() {}
00120
00121 private:
00122 vtkQtChartMouseZoomY(const vtkQtChartMouseZoomY &);
00123 vtkQtChartMouseZoomY &operator=(const vtkQtChartMouseZoomY &);
00124 };
00125
00126
00130 class VTKQTCHART_EXPORT vtkQtChartMouseZoomBox : public vtkQtChartMouseFunction
00131 {
00132 public:
00136 vtkQtChartMouseZoomBox(QObject *parent=0);
00137 virtual ~vtkQtChartMouseZoomBox();
00138
00140
00141 virtual void setMouseOwner(bool owns);
00142
00143 virtual bool mousePressEvent(QMouseEvent *e, vtkQtChartArea *chart);
00144 virtual bool mouseMoveEvent(QMouseEvent *e, vtkQtChartArea *chart);
00145 virtual bool mouseReleaseEvent(QMouseEvent *e, vtkQtChartArea *chart);
00146 virtual bool mouseDoubleClickEvent(QMouseEvent *e, vtkQtChartArea *chart);
00148
00149 private:
00150 QCursor *ZoomCursor;
00151
00152 private:
00153 vtkQtChartMouseZoomBox(const vtkQtChartMouseZoomBox &);
00154 vtkQtChartMouseZoomBox &operator=(const vtkQtChartMouseZoomBox &);
00155 };
00156
00157 #endif