00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkQtChartMouseSelection.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 _vtkQtChartMouseSelection_h 00025 #define _vtkQtChartMouseSelection_h 00026 00027 00028 #include "vtkQtChartExport.h" 00029 #include "vtkQtChartMouseFunction.h" 00030 00031 class vtkQtChartArea; 00032 class vtkQtChartMouseSelectionHandler; 00033 class vtkQtChartMouseSelectionInternal; 00034 class QMouseEvent; 00035 class QString; 00036 class QStringList; 00037 00038 00043 class VTKQTCHART_EXPORT vtkQtChartMouseSelection : 00044 public vtkQtChartMouseFunction 00045 { 00046 Q_OBJECT 00047 00048 public: 00052 vtkQtChartMouseSelection(QObject *parent=0); 00053 virtual ~vtkQtChartMouseSelection(); 00054 00056 00057 virtual bool isCombinable() const {return false;} 00058 00063 const QString &getSelectionMode() const; 00064 00069 const QStringList &getModeList() const; 00070 00077 void addHandler(vtkQtChartMouseSelectionHandler *handler); 00078 00083 void insertHandler(int index, vtkQtChartMouseSelectionHandler *handler); 00084 00088 void removeHandler(vtkQtChartMouseSelectionHandler *handler); 00090 00092 00093 virtual bool mousePressEvent(QMouseEvent *e, vtkQtChartArea *chart); 00094 virtual bool mouseMoveEvent(QMouseEvent *e, vtkQtChartArea *chart); 00095 virtual bool mouseReleaseEvent(QMouseEvent *e, vtkQtChartArea *chart); 00096 virtual bool mouseDoubleClickEvent(QMouseEvent *e, vtkQtChartArea *chart); 00098 00099 public slots: 00103 void setSelectionMode(const QString &mode); 00104 00105 signals: 00107 void modeListChanged(); 00108 00112 void selectionModeChanged(const QString &mode); 00113 00114 private: 00116 vtkQtChartMouseSelectionInternal *Internal; 00117 00118 private: 00119 vtkQtChartMouseSelection(const vtkQtChartMouseSelection &); 00120 vtkQtChartMouseSelection &operator=(const vtkQtChartMouseSelection &); 00121 }; 00122 00123 #endif