VTK
dox/GUISupport/Qt/Chart/vtkQtChartZoomHistory.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkQtChartZoomHistory.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 _vtkQtChartZoomHistory_h
00025 #define _vtkQtChartZoomHistory_h
00026 
00027 
00028 #include "vtkQtChartExport.h"
00029 
00030 class vtkQtChartZoomHistoryInternal;
00031 
00032 
00040 class VTKQTCHART_EXPORT vtkQtChartZoomViewport
00041 {
00042 public:
00043   vtkQtChartZoomViewport();
00044   ~vtkQtChartZoomViewport() {}
00045 
00052   void setPosition(float x, float y);
00053 
00060   void setZoom(float x, float y);
00061 
00067   float getXPosition() const {return this->X;}
00068 
00074   float getYPosition() const {return this->Y;}
00075 
00081   float getXZoom() const {return this->XFactor;}
00082 
00088   float getYZoom() const {return this->YFactor;}
00089 
00090 private:
00091   float X;        
00092   float Y;        
00093   float XFactor;  
00094   float YFactor;  
00095 };
00096 
00097 
00124 class VTKQTCHART_EXPORT vtkQtChartZoomHistory
00125 {
00126 public:
00127   vtkQtChartZoomHistory();
00128   ~vtkQtChartZoomHistory();
00129 
00133   void setLimit(int limit);
00134 
00139   int getLimit() const {return this->Allowed;}
00140 
00154   void addHistory(float x, float y, float xZoom, float yZoom);
00155 
00166   void updatePosition(float x, float y);
00167 
00172   bool isPreviousAvailable() const;
00173 
00178   bool isNextAvailable() const;
00179 
00185   const vtkQtChartZoomViewport *getCurrent() const;
00186 
00193   const vtkQtChartZoomViewport *getPrevious();
00194 
00201   const vtkQtChartZoomViewport *getNext();
00202 
00203 private:
00205   vtkQtChartZoomHistoryInternal *Internal;
00206 
00207   int Current; 
00208   int Allowed; 
00209 };
00210 
00211 #endif