VTK
vtkQtChartMouseBox.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQtChartMouseBox.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 _vtkQtChartMouseBox_h
25 #define _vtkQtChartMouseBox_h
26 
27 
28 #include "vtkQtChartExport.h"
29 #include <QObject>
30 
31 class QGraphicsView;
32 class QPoint;
33 class QPointF;
34 class QRectF;
35 
36 
82 class VTKQTCHART_EXPORT vtkQtChartMouseBox : public QObject
83 {
84  Q_OBJECT
85 
86 public:
87  vtkQtChartMouseBox(QGraphicsView *view);
89 
94  bool isVisible() const {return this->Showing;}
95 
99  void setVisible(bool visible);
100 
105  const QPointF &getStartingPosition() const;
106 
116  void setStartingPosition(const QPoint &start);
117 
126  void adjustRectangle(const QPoint &current);
127 
132  const QRectF &getRectangle() const;
133 
134 signals:
135  // \brief
136  // Emitted when the mouse box changes.
137  // \param area The area to repaint in scene coordinates.
138  void updateNeeded(const QRectF &area);
139 
140 private:
141  QGraphicsView *View;
142  QPointF *Last;
143  QRectF *Box;
144  bool Showing;
145 };
146 
147 #endif
The vtkQtChartMouseBox class is used to draw a mouse box that can be used for zooming or selection...
bool isVisible() const
Gets whether or not the mouse box is visible.