VTK
dox/GUISupport/Qt/Chart/vtkQtStatisticalBoxChart.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkQtStatisticalBoxChart.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 _vtkQtStatisticalBoxChart_h
00025 #define _vtkQtStatisticalBoxChart_h
00026 
00027 #include "vtkQtChartExport.h"
00028 #include "vtkQtChartSeriesLayer.h"
00029 
00030 class vtkQtStatisticalBoxChartInternal;
00031 class vtkQtStatisticalBoxChartOptions;
00032 
00036 class VTKQTCHART_EXPORT vtkQtStatisticalBoxChart : public vtkQtChartSeriesLayer
00037 {
00038   Q_OBJECT
00039 
00040 public:
00041   vtkQtStatisticalBoxChart();
00042   virtual ~vtkQtStatisticalBoxChart();
00043 
00045 
00046   virtual void setChartArea(vtkQtChartArea *area);
00047 
00048   virtual void setModel(vtkQtChartSeriesModel *model);
00050 
00052 
00053 
00054 
00055 
00056 
00057   vtkQtStatisticalBoxChartOptions *getOptions() const {return this->Options;}
00058 
00066   void setOptions(const vtkQtStatisticalBoxChartOptions &options);
00067 
00068   virtual QPixmap getSeriesIcon(int series) const;
00070 
00072 
00073   virtual void getLayerDomain(vtkQtChartLayerDomain &domain) const;
00074 
00075   virtual void layoutChart(const QRectF &area);
00076 
00077   virtual bool getHelpText(const QPointF &point, QString &text);
00078 
00084   virtual void finishInteractiveResize();
00086 
00088 
00089   virtual void getSeriesAt(const QPointF &point,
00090       vtkQtChartSeriesSelection &selection) const;
00091 
00092   virtual void getPointsAt(const QPointF &point,
00093       vtkQtChartSeriesSelection &selection) const;
00094 
00095   virtual void getSeriesIn(const QRectF &area,
00096       vtkQtChartSeriesSelection &selection) const;
00097 
00098   virtual void getPointsIn(const QRectF &area,
00099       vtkQtChartSeriesSelection &selection) const;
00101 
00103 
00104   virtual QRectF boundingRect() const;
00105 
00106   virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
00107       QWidget *widget=0);
00109 
00110 public slots:
00116   void reset();
00117 
00118 protected slots:
00126   virtual void handleOptionsChanged(vtkQtChartSeriesOptions*,
00127     int type, const QVariant& newvalue, const QVariant& oldvalue);
00128 
00129 protected:
00137   virtual void setupOptions(vtkQtChartSeriesOptions *options);
00138 
00139 private slots:
00144   void prepareSeriesInsert(int first, int last);
00145 
00150   void insertSeries(int first, int last);
00151 
00156   void startSeriesRemoval(int first, int last);
00157 
00162   void finishSeriesRemoval(int first, int last);
00163 
00165   void handleAxesCornerChange();
00166 
00168   void handleOutlineChange();
00169 
00170 
00175   void updateHighlights();
00176 
00177 private:
00184   void handleSeriesVisibilityChange(vtkQtChartSeriesOptions* options, bool visible);
00185 
00187   void handleSeriesPointMarkerChanged(vtkQtChartSeriesOptions*);
00188 
00195   bool addSeriesDomain(int series, int &seriesGroup);
00196 
00200   void calculateDomain(int seriesGroup);
00201 
00205   void createShapeTable(int seriesGroup);
00206 
00210   void buildShapeTree(int seriesGroup);
00211 
00212 private:
00213   vtkQtStatisticalBoxChartInternal *Internal; 
00214   vtkQtStatisticalBoxChartOptions *Options;   
00215   bool InModelChange;                         
00216   bool BuildNeeded;                           
00217 
00218 private:
00219   vtkQtStatisticalBoxChart(const vtkQtStatisticalBoxChart &);
00220   vtkQtStatisticalBoxChart &operator=(const vtkQtStatisticalBoxChart &);
00221 };
00222 
00223 #endif