VTK
vtkQtChartMouseSelection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQtChartMouseSelection.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 _vtkQtChartMouseSelection_h
25 #define _vtkQtChartMouseSelection_h
26 
27 
28 #include "vtkQtChartExport.h"
30 
31 class vtkQtChartArea;
33 class vtkQtChartMouseSelectionInternal;
34 class QMouseEvent;
35 class QString;
36 class QStringList;
37 
38 
43 class VTKQTCHART_EXPORT vtkQtChartMouseSelection :
45 {
46  Q_OBJECT
47 
48 public:
52  vtkQtChartMouseSelection(QObject *parent=0);
53  virtual ~vtkQtChartMouseSelection();
54 
56 
57  virtual bool isCombinable() const {return false;}
58 
63  const QString &getSelectionMode() const;
64 
69  const QStringList &getModeList() const;
70 
77  void addHandler(vtkQtChartMouseSelectionHandler *handler);
78 
83  void insertHandler(int index, vtkQtChartMouseSelectionHandler *handler);
84 
88  void removeHandler(vtkQtChartMouseSelectionHandler *handler);
90 
92 
93  virtual bool mousePressEvent(QMouseEvent *e, vtkQtChartArea *chart);
94  virtual bool mouseMoveEvent(QMouseEvent *e, vtkQtChartArea *chart);
95  virtual bool mouseReleaseEvent(QMouseEvent *e, vtkQtChartArea *chart);
96  virtual bool mouseDoubleClickEvent(QMouseEvent *e, vtkQtChartArea *chart);
98 
99 public slots:
103  void setSelectionMode(const QString &mode);
104 
105 signals:
107  void modeListChanged();
108 
112  void selectionModeChanged(const QString &mode);
113 
114 private:
116  vtkQtChartMouseSelectionInternal *Internal;
117 
118 private:
121 };
122 
123 #endif