VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkQtStatisticalBoxChart.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 _vtkQtStatisticalBoxChart_h 00025 #define _vtkQtStatisticalBoxChart_h 00026 00027 #include "vtkQtChartExport.h" 00028 #include "vtkQtChartSeriesLayer.h" 00029 00030 class vtkQtStatisticalBoxChartInternal; 00031 class vtkQtStatisticalBoxChartOptions; 00032 class vtkQtStatisticalBoxChartSeriesOptions; 00033 00034 00038 class VTKQTCHART_EXPORT vtkQtStatisticalBoxChart : public vtkQtChartSeriesLayer 00039 { 00040 Q_OBJECT 00041 00042 public: 00043 vtkQtStatisticalBoxChart(); 00044 virtual ~vtkQtStatisticalBoxChart(); 00045 00047 00048 virtual void setChartArea(vtkQtChartArea *area); 00049 00050 virtual void setModel(vtkQtChartSeriesModel *model); 00052 00054 00055 00056 00057 00058 00059 vtkQtStatisticalBoxChartOptions *getOptions() const {return this->Options;} 00060 00068 void setOptions(const vtkQtStatisticalBoxChartOptions &options); 00069 00075 vtkQtStatisticalBoxChartSeriesOptions *getBoxSeriesOptions(int series) const; 00076 00077 virtual QPixmap getSeriesIcon(int series) const; 00079 00081 00082 virtual void getLayerDomain(vtkQtChartLayerDomain &domain) const; 00083 00084 virtual void layoutChart(const QRectF &area); 00085 00086 virtual bool getHelpText(const QPointF &point, QString &text); 00087 00093 virtual void finishInteractiveResize(); 00095 00097 00098 virtual void getSeriesAt(const QPointF &point, 00099 vtkQtChartSeriesSelection &selection) const; 00100 00101 virtual void getPointsAt(const QPointF &point, 00102 vtkQtChartSeriesSelection &selection) const; 00103 00104 virtual void getSeriesIn(const QRectF &area, 00105 vtkQtChartSeriesSelection &selection) const; 00106 00107 virtual void getPointsIn(const QRectF &area, 00108 vtkQtChartSeriesSelection &selection) const; 00110 00112 00113 virtual QRectF boundingRect() const; 00114 00115 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, 00116 QWidget *widget=0); 00118 00119 public slots: 00125 void reset(); 00126 00127 protected: 00133 virtual vtkQtChartSeriesOptions *createOptions(QObject *parent); 00134 00138 virtual void setupOptions(vtkQtChartSeriesOptions *options); 00139 00140 private slots: 00145 void prepareSeriesInsert(int first, int last); 00146 00151 void insertSeries(int first, int last); 00152 00157 void startSeriesRemoval(int first, int last); 00158 00163 void finishSeriesRemoval(int first, int last); 00164 00166 void handleAxesCornerChange(); 00167 00169 void handleOutlineChange(); 00170 00177 void handleSeriesVisibilityChange(bool visible); 00178 00182 void handleSeriesPenChange(const QPen &pen); 00183 00187 void handleSeriesBrushChange(const QBrush &brush); 00188 00190 void handleSeriesPointMarkerChanged(); 00191 00196 void updateHighlights(); 00197 00198 private: 00205 bool addSeriesDomain(int series, int &seriesGroup); 00206 00210 void calculateDomain(int seriesGroup); 00211 00215 void createShapeTable(int seriesGroup); 00216 00220 void buildShapeTree(int seriesGroup); 00221 00222 private: 00223 vtkQtStatisticalBoxChartInternal *Internal; 00224 vtkQtStatisticalBoxChartOptions *Options; 00225 bool InModelChange; 00226 bool BuildNeeded; 00227 00228 private: 00229 vtkQtStatisticalBoxChart(const vtkQtStatisticalBoxChart &); 00230 vtkQtStatisticalBoxChart &operator=(const vtkQtStatisticalBoxChart &); 00231 }; 00232 00233 #endif