00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00023
00024 #ifndef _vtkQtChartLayer_h
00025 #define _vtkQtChartLayer_h
00026
00027 #include "vtkQtChartExport.h"
00028 #include <QObject>
00029 #include <QGraphicsItem>
00030
00031 #include "vtkQtChartGraphicsItemTypes.h"
00032
00033 class vtkQtChartAxis;
00034 class vtkQtChartLayerDomain;
00035 class vtkQtChartArea;
00036 class QPainter;
00037
00038
00043 class VTKQTCHART_EXPORT vtkQtChartLayer : public QObject, public QGraphicsItem
00044 {
00045 Q_OBJECT
00046
00047 public:
00048 enum AxesCorner
00049 {
00050 BottomLeft = 0,
00051 BottomRight,
00052 TopLeft,
00053 TopRight
00054 };
00055
00056 enum {Type = vtkQtChart_LayerType};
00057
00058 public:
00059 vtkQtChartLayer();
00060 virtual ~vtkQtChartLayer() {}
00061
00062 virtual int type() const {return vtkQtChartLayer::Type;}
00063
00068 vtkQtChartArea *getChartArea() const {return this->ChartArea;}
00069
00078 virtual void setChartArea(vtkQtChartArea *area) {this->ChartArea = area;}
00079
00088 virtual void getLayerDomain(vtkQtChartLayerDomain &domain) const;
00089
00098 virtual void layoutChart(const QRectF &area)=0;
00099
00116 virtual bool drawItemFilter(QGraphicsItem *item, QPainter *painter);
00117
00129 virtual bool getHelpText(const QPointF &point, QString &text);
00130
00132 virtual void startInteractiveResize() {}
00133
00135 virtual void finishInteractiveResize() {}
00136
00137 signals:
00139 void layoutNeeded();
00140
00146 void rangeChanged();
00147
00148 protected:
00149 vtkQtChartArea *ChartArea;
00150 };
00151
00152 #endif