VTK
dox/GUISupport/Qt/Chart/vtkQtChartMouseBox.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkQtChartMouseBox.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 _vtkQtChartMouseBox_h
00025 #define _vtkQtChartMouseBox_h
00026 
00027 
00028 #include "vtkQtChartExport.h"
00029 #include <QObject>
00030 
00031 class QGraphicsView;
00032 class QPoint;
00033 class QPointF;
00034 class QRectF;
00035 
00036 
00082 class VTKQTCHART_EXPORT vtkQtChartMouseBox : public QObject
00083 {
00084   Q_OBJECT
00085 
00086 public:
00087   vtkQtChartMouseBox(QGraphicsView *view);
00088   ~vtkQtChartMouseBox();
00089 
00094   bool isVisible() const {return this->Showing;}
00095 
00099   void setVisible(bool visible);
00100 
00105   const QPointF &getStartingPosition() const;
00106 
00116   void setStartingPosition(const QPoint &start);
00117 
00126   void adjustRectangle(const QPoint &current);
00127 
00132   const QRectF &getRectangle() const;
00133 
00134 signals:
00135   // \brief
00136   //   Emitted when the mouse box changes.
00137   // \param area The area to repaint in scene coordinates.
00138   void updateNeeded(const QRectF &area);
00139 
00140 private:
00141   QGraphicsView *View; 
00142   QPointF *Last;       
00143   QRectF *Box;         
00144   bool Showing;        
00145 };
00146 
00147 #endif