00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkQtChartSeriesLayer.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 00023 00024 #ifndef _vtkQtChartSeriesLayer_h 00025 #define _vtkQtChartSeriesLayer_h 00026 00027 #include "vtkQtChartExport.h" 00028 #include "vtkQtChartLayer.h" 00029 #include <QPixmap> // needed for return type 00030 00031 class vtkQtChartContentsArea; 00032 class vtkQtChartSeriesModel; 00033 class vtkQtChartSeriesOptions; 00034 class vtkQtChartSeriesOptionsModel; 00035 class vtkQtChartSeriesSelection; 00036 class vtkQtChartSeriesSelectionModel; 00037 class QPointF; 00038 class QRectF; 00039 00040 00048 class VTKQTCHART_EXPORT vtkQtChartSeriesLayer : public vtkQtChartLayer 00049 { 00050 Q_OBJECT 00051 00052 public: 00053 enum {Type = vtkQtChart_SeriesLayerType}; 00054 00055 public: 00056 vtkQtChartSeriesLayer(bool useContents=true); 00057 virtual ~vtkQtChartSeriesLayer() {} 00058 00068 virtual void setChartArea(vtkQtChartArea *area); 00069 00074 vtkQtChartSeriesModel *getModel() const {return this->Model;} 00075 00079 virtual void setModel(vtkQtChartSeriesModel *model); 00080 00085 vtkQtChartSeriesOptionsModel* getOptionsModel() const 00086 { return this->Options; } 00087 00091 virtual void setOptionsModel(vtkQtChartSeriesOptionsModel* model); 00092 00098 vtkQtChartSeriesOptions *getSeriesOptions(int series) const; 00099 00105 int getSeriesOptionsIndex(vtkQtChartSeriesOptions *options) const; 00106 00115 virtual QPixmap getSeriesIcon(int series) const; 00116 00121 vtkQtChartSeriesSelectionModel *getSelectionModel() const; 00122 00127 virtual void getSeriesAt(const QPointF &point, 00128 vtkQtChartSeriesSelection &selection) const; 00129 00134 virtual void getPointsAt(const QPointF &point, 00135 vtkQtChartSeriesSelection &selection) const; 00136 00141 virtual void getSeriesIn(const QRectF &area, 00142 vtkQtChartSeriesSelection &selection) const; 00143 00148 virtual void getPointsIn(const QRectF &area, 00149 vtkQtChartSeriesSelection &selection) const; 00150 00151 public slots: 00155 void setXOffset(float offset); 00156 00160 void setYOffset(float offset); 00161 00162 signals: 00167 void modelChanged(vtkQtChartSeriesModel *previous, 00168 vtkQtChartSeriesModel *current); 00169 00174 void modelSeriesChanged(int first, int last); 00175 00176 protected slots: 00184 virtual void handleOptionsChanged(vtkQtChartSeriesOptions*, 00185 int type, const QVariant& newvalue, const QVariant& oldvalue); 00186 00187 protected: 00195 virtual void setupOptions(vtkQtChartSeriesOptions *options); 00196 00201 virtual void cleanupOptions(vtkQtChartSeriesOptions* options); 00202 00203 protected: 00205 vtkQtChartSeriesSelectionModel *Selection; 00206 vtkQtChartSeriesModel *Model; 00207 vtkQtChartContentsArea *Contents; 00208 vtkQtChartSeriesOptionsModel* Options; 00209 00210 private: 00211 vtkQtChartSeriesLayer(const vtkQtChartSeriesLayer &); 00212 vtkQtChartSeriesLayer &operator=(const vtkQtChartSeriesLayer &); 00213 }; 00214 00215 #endif 00216