VTK
vtkQtChartMouseFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQtChartMouseFunction.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
20 
23 
24 #ifndef _vtkQtChartMouseFunction_h
25 #define _vtkQtChartMouseFunction_h
26 
27 
28 #include "vtkQtChartExport.h"
29 #include <QObject>
30 
31 class vtkQtChartArea;
32 class QCursor;
33 class QMouseEvent;
34 class QRectF;
35 class QWheelEvent;
36 
37 
42 class VTKQTCHART_EXPORT vtkQtChartMouseFunction : public QObject
43 {
44  Q_OBJECT
45 
46 public:
50  vtkQtChartMouseFunction(QObject *parent=0);
52 
63  virtual bool isCombinable() const {return true;}
64 
69  bool isMouseOwner() const {return this->OwnsMouse;}
70 
75  // vtkQtChartMouseFunction::interactionStarted(vtkQtChartMouseFunction *)
76  virtual void setMouseOwner(bool owns) {this->OwnsMouse = owns;}
77 
84  virtual bool mousePressEvent(QMouseEvent *e, vtkQtChartArea *chart)=0;
85 
92  virtual bool mouseMoveEvent(QMouseEvent *e, vtkQtChartArea *chart)=0;
93 
100  virtual bool mouseReleaseEvent(QMouseEvent *e, vtkQtChartArea *chart)=0;
101 
108  virtual bool mouseDoubleClickEvent(QMouseEvent *e, vtkQtChartArea *chart)=0;
109 
116  virtual bool wheelEvent(QWheelEvent *e, vtkQtChartArea *chart);
117 
118 signals:
127  void interactionStarted(vtkQtChartMouseFunction *function);
128 
132  void interactionFinished(vtkQtChartMouseFunction *function);
133 
137  void cursorChangeRequested(const QCursor &cursor);
138 
139 private:
140  bool OwnsMouse;
141 };
142 
143 #endif
The vtkQtChartMouseFunction class is the base class for all chart mouse functions.
virtual void setMouseOwner(bool owns)
Sets whether or not the function owns the mouse.
The vtkQtChartArea class manages the chart axes and layers.
bool isMouseOwner() const
Gets whether or not the function owns the mouse.
virtual bool isCombinable() const
Gets whether or not the function is combinable.