VTK
vtkQtChartSeriesModelCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQtChartSeriesModelCollection.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 _vtkQtChartSeriesModelCollection_h
25 #define _vtkQtChartSeriesModelCollection_h
26 
27 #include "vtkQtChartExport.h"
28 #include "vtkQtChartSeriesModel.h"
29 
30 
38 class VTKQTCHART_EXPORT vtkQtChartSeriesModelCollection :
40 {
41  Q_OBJECT
42 
43 public:
47  vtkQtChartSeriesModelCollection(QObject *parent=0);
49 
51 
52  virtual int getNumberOfSeries() const;
53  virtual int getNumberOfSeriesValues(int series) const;
54  virtual QVariant getSeriesName(int series) const;
55  virtual QVariant getSeriesValue(int series, int index, int component) const;
56  virtual QList<QVariant> getSeriesRange(int series, int component) const;
58 
62  void addSeriesModel(vtkQtChartSeriesModel *model);
63 
67  void removeSeriesModel(vtkQtChartSeriesModel *model);
68 
73  int getNumberOfSeriesModels() const;
74 
80  vtkQtChartSeriesModel *getSeriesModel(int index) const;
81 
89  int mapSeriesIndexToCollectionIndex(vtkQtChartSeriesModel* model, int index) const;
90 
91 protected slots:
101  void onSeriesAboutToBeInserted(int first, int last);
102 
107  void onSeriesInserted(int first, int last);
108 
113  void onSeriesAboutToBeRemoved(int first, int last);
114 
119  void onSeriesRemoved(int first, int last);
120 
121 private:
128  vtkQtChartSeriesModel *modelForSeries(int &series) const;
129 
135  int seriesForModel(vtkQtChartSeriesModel *model) const;
136 
137 private:
138  QList<vtkQtChartSeriesModel *> Models;
139 
140 private:
144 };
145 
146 #endif
147 
virtual QVariant getSeriesName(int series) const =0
Gets the name for the given series.
The vtkQtChartSeriesModel class is the base class for all chart series models.
virtual int getNumberOfSeriesValues(int series) const =0
Gets the number of values in a series.
virtual QVariant getSeriesValue(int series, int index, int component) const =0
Gets the series value for the given index and component.
The vtkQtChartSeriesModelCollection class is used to combine chart series models. ...
virtual QList< QVariant > getSeriesRange(int series, int component) const =0
Gets the value range for a series component.
virtual int getNumberOfSeries() const =0
Gets the number of series in the model.