VTK
vtkQtChartSeriesModelRange.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQtChartSeriesModelRange.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 _vtkQtChartSeriesModelRange_h
25 #define _vtkQtChartSeriesModelRange_h
26 
27 #include "vtkQtChartExport.h"
28 #include <QObject>
29 #include <QList> // Needed for return type.
30 #include <QVariant> // Needed for return type.
31 
33 
34 
39 class VTKQTCHART_EXPORT vtkQtChartSeriesModelRange : public QObject
40 {
41  Q_OBJECT
42 
43 public:
47  vtkQtChartSeriesModelRange(QObject *parent=0);
49 
54  vtkQtChartSeriesModel *getModel() const {return this->Model;}
55 
60  void setModel(vtkQtChartSeriesModel *model, bool xShared=false);
61 
66  bool isXRangeShared() const {return this->XRangeShared;}
67 
74  QList<QVariant> getSeriesRange(int series, int component) const;
75 
76 private slots:
78  void resetSeries();
79 
87  void insertSeries(int first, int last);
88 
93  void removeSeries(int first, int last);
94 
95 private:
102  QList<QVariant> computeSeriesRange(int series, int component);
103 
104 private:
105  QList<QList<QVariant> > Range[2];
106  vtkQtChartSeriesModel *Model;
107  bool XRangeShared;
108 };
109 
110 #endif