00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkQtChartSeriesOptionsModelCollection.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 00021 #ifndef __vtkQtChartSeriesOptionsModelCollection_h 00022 #define __vtkQtChartSeriesOptionsModelCollection_h 00023 00024 #include "vtkQtChartSeriesOptionsModel.h" 00025 00035 00036 class VTKQTCHART_EXPORT vtkQtChartSeriesOptionsModelCollection : 00037 public vtkQtChartSeriesOptionsModel 00038 { 00039 Q_OBJECT 00040 public: 00041 typedef vtkQtChartSeriesOptionsModel Superclass; 00042 00046 vtkQtChartSeriesOptionsModelCollection(QObject* parent=0); 00047 virtual ~vtkQtChartSeriesOptionsModelCollection(); 00048 00050 00051 00052 00053 virtual int getNumberOfOptions() const; 00054 00060 virtual vtkQtChartSeriesOptions* getOptions(int series) const; 00061 00067 virtual int getOptionsIndex(vtkQtChartSeriesOptions *options) const; 00069 00073 void addSeriesOptionsModel(vtkQtChartSeriesOptionsModel *model); 00074 00078 void removeSeriesOptionsModel(vtkQtChartSeriesOptionsModel* model); 00079 00084 int getNumberOfSeriesOptionsModels() const; 00085 00091 vtkQtChartSeriesOptionsModel* getSeriesOptionsModel(int index) const; 00092 00100 int mapSeriesIndexToCollectionIndex( 00101 vtkQtChartSeriesOptionsModel* model, int index) const; 00102 00103 public slots: 00106 virtual void reset(); 00107 00108 protected slots: 00118 void onOptionsAboutToBeInserted(int first, int last); 00119 00124 void onOptionsInserted(int first, int last); 00125 00130 void onOptionsAboutToBeRemoved(int first, int last); 00131 00136 void onOptionsRemoved(int first, int last); 00137 00138 private: 00145 vtkQtChartSeriesOptionsModel *modelForSeries(int &series) const; 00146 00152 int seriesForModel(vtkQtChartSeriesOptionsModel *model) const; 00153 00154 private: 00155 QList<vtkQtChartSeriesOptionsModel*> Models; 00156 00157 private: 00158 vtkQtChartSeriesOptionsModelCollection(const 00159 vtkQtChartSeriesOptionsModelCollection&); 00160 void operator=( 00161 const vtkQtChartSeriesOptionsModelCollection&); 00162 }; 00163 00164 #endif 00165 00166