VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkQtChartMouseFunction.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 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 // vtkQtChartMouseFunction::interactionStarted(vtkQtChartMouseFunction *) 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