00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00023
00024 #ifndef _vtkQtChartTableSeriesModel_h
00025 #define _vtkQtChartTableSeriesModel_h
00026
00027 #include "vtkQtChartExport.h"
00028 #include "vtkQtChartSeriesModel.h"
00029
00030 class vtkQtChartSeriesModelRange;
00031 class QAbstractItemModel;
00032 class QModelIndex;
00033
00034
00039 class VTKQTCHART_EXPORT vtkQtChartTableSeriesModel :
00040 public vtkQtChartSeriesModel
00041 {
00042 Q_OBJECT
00043
00044 public:
00049 vtkQtChartTableSeriesModel(QAbstractItemModel *model, QObject *parent=0);
00050 virtual ~vtkQtChartTableSeriesModel() {}
00051
00056 QAbstractItemModel *getItemModel() const {return this->Model;}
00057
00061 void setItemModel(QAbstractItemModel *model);
00062
00067 bool getColumnsAsSeries() const;
00068
00072 void setColumnsAsSeries(bool columnsAsSeries);
00073
00075
00076 virtual int getNumberOfSeries() const;
00077 virtual int getNumberOfSeriesValues(int series) const;
00078 virtual QVariant getSeriesName(int series) const;
00079 virtual QVariant getSeriesValue(int series, int index, int component) const;
00080 virtual QList<QVariant> getSeriesRange(int series, int component) const;
00082
00083 protected slots:
00089 void rowsAboutToBeInserted(const QModelIndex &index, int first, int last);
00090
00096 void rowsInserted(const QModelIndex &index, int first, int last);
00097
00103 void columnsAboutToBeInserted(const QModelIndex &index, int first, int last);
00104
00110 void columnsInserted(const QModelIndex &index, int first, int last);
00111
00117 void rowsAboutToBeRemoved(const QModelIndex &index, int first, int last);
00118
00124 void rowsRemoved(const QModelIndex &index, int first, int last);
00125
00131 void columnsAboutToBeRemoved(const QModelIndex &index, int first, int last);
00132
00138 void columnsRemoved(const QModelIndex &index, int first, int last);
00139
00140 protected:
00141 QAbstractItemModel *Model;
00142 vtkQtChartSeriesModelRange *Range;
00143 bool ColumnsAsSeries;
00144
00145 private:
00146 vtkQtChartTableSeriesModel(const vtkQtChartTableSeriesModel &);
00147 vtkQtChartTableSeriesModel &operator=(const vtkQtChartTableSeriesModel &);
00148 };
00149
00150 #endif
00151