00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00023
00024 #ifndef _vtkQtChartLineLayer_h
00025 #define _vtkQtChartLineLayer_h
00026
00027 #include "vtkQtChartExport.h"
00028 #include "vtkQtChartSeriesLayer.h"
00029
00030 class vtkQtLineChartInternal;
00031 class vtkQtLineChartOptions;
00032
00033
00037 class VTKQTCHART_EXPORT vtkQtLineChart : public vtkQtChartSeriesLayer
00038 {
00039 Q_OBJECT
00040
00041 public:
00042 enum {Type = vtkQtChart_LineChartType};
00043
00044 public:
00045 vtkQtLineChart();
00046 virtual ~vtkQtLineChart();
00047
00049
00050 virtual void setChartArea(vtkQtChartArea *area);
00051
00052 virtual void setModel(vtkQtChartSeriesModel *model);
00054
00056
00057
00058
00059
00060
00061 vtkQtLineChartOptions *getOptions() const {return this->Options;}
00062
00070 void setOptions(const vtkQtLineChartOptions &options);
00071
00072 virtual QPixmap getSeriesIcon(int series) const;
00074
00076
00077 virtual void getLayerDomain(vtkQtChartLayerDomain &domain) const;
00078
00079 virtual void layoutChart(const QRectF &area);
00080
00081 virtual bool getHelpText(const QPointF &point, QString &text);
00082
00088 virtual void finishInteractiveResize();
00090
00092
00093 virtual void getSeriesAt(const QPointF &point,
00094 vtkQtChartSeriesSelection &selection) const;
00095
00096 virtual void getPointsAt(const QPointF &point,
00097 vtkQtChartSeriesSelection &selection) const;
00098
00099 virtual void getSeriesIn(const QRectF &area,
00100 vtkQtChartSeriesSelection &selection) const;
00101
00102 virtual void getPointsIn(const QRectF &area,
00103 vtkQtChartSeriesSelection &selection) const;
00105
00107
00108 virtual QRectF boundingRect() const;
00109 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
00110 QWidget *widget);
00112
00113 public slots:
00119 void reset();
00120
00121 protected slots:
00129 virtual void handleOptionsChanged(vtkQtChartSeriesOptions*,
00130 int type, const QVariant& newvalue, const QVariant& oldvalue);
00131
00133 void handleLayoutNeeded();
00134
00135 private slots:
00140 void prepareSeriesInsert(int first, int last);
00141
00146 void insertSeries(int first, int last);
00147
00152 void startSeriesRemoval(int first, int last);
00153
00158 void finishSeriesRemoval(int first, int last);
00159
00166 void handleSeriesVisibilityChange(
00167 vtkQtChartSeriesOptions* options, bool visible);
00168
00176 void handleSeriesAxesCornerChange(
00177 vtkQtChartSeriesOptions* options, int corner, int previous);
00178
00180 void handleSeriesPointMarkerChange(vtkQtChartSeriesOptions*);
00181
00186 void updateHighlights();
00187
00188 private:
00196 bool addSeriesDomain(int series, vtkQtChartLayer::AxesCorner corner,
00197 int *seriesGroup);
00198
00203 void calculateDomain(int seriesGroup, vtkQtChartLayer::AxesCorner corner);
00204
00206 void buildTree();
00207
00208 private:
00209 vtkQtLineChartInternal *Internal;
00210 vtkQtLineChartOptions *Options;
00211 bool InModelChange;
00212 bool BuildNeeded;
00213 };
00214
00215 #endif