VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkQtChartTableSeriesModel.h,v $ 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 _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 bool getColumnsAsSeries() const; 00057 00061 void setColumnsAsSeries(bool columnsAsSeries); 00062 00064 00065 virtual int getNumberOfSeries() const; 00066 virtual int getNumberOfSeriesValues(int series) const; 00067 virtual QVariant getSeriesName(int series) const; 00068 virtual QVariant getSeriesValue(int series, int index, int component) const; 00069 virtual QList<QVariant> getSeriesRange(int series, int component) const; 00071 00072 protected slots: 00078 void rowsAboutToBeInserted(const QModelIndex &index, int first, int last); 00079 00085 void rowsInserted(const QModelIndex &index, int first, int last); 00086 00092 void columnsAboutToBeInserted(const QModelIndex &index, int first, int last); 00093 00099 void columnsInserted(const QModelIndex &index, int first, int last); 00100 00106 void rowsAboutToBeRemoved(const QModelIndex &index, int first, int last); 00107 00113 void rowsRemoved(const QModelIndex &index, int first, int last); 00114 00120 void columnsAboutToBeRemoved(const QModelIndex &index, int first, int last); 00121 00127 void columnsRemoved(const QModelIndex &index, int first, int last); 00128 00129 protected: 00130 QAbstractItemModel *Model; 00131 vtkQtChartSeriesModelRange *Range; 00132 bool ColumnsAsSeries; 00133 00134 private: 00135 vtkQtChartTableSeriesModel(const vtkQtChartTableSeriesModel &); 00136 vtkQtChartTableSeriesModel &operator=(const vtkQtChartTableSeriesModel &); 00137 }; 00138 00139 #endif 00140