00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00023
00024 #ifndef _vtkQtChartArea_h
00025 #define _vtkQtChartArea_h
00026
00027 #include "vtkQtChartExport.h"
00028 #include <QGraphicsView>
00029
00030 class vtkQtChartAreaInternal;
00031 class vtkQtChartAxisLayer;
00032 class vtkQtChartContentsSpace;
00033 class vtkQtChartInteractor;
00034 class vtkQtChartLayer;
00035 class vtkQtChartMouseBox;
00036 class vtkQtChartStyleManager;
00037 class QCursor;
00038 class QString;
00039
00040
00044 class VTKQTCHART_EXPORT vtkQtChartArea : public QGraphicsView
00045 {
00046 Q_OBJECT
00047
00048 public:
00052 vtkQtChartArea(QWidget *parent=0);
00053 virtual ~vtkQtChartArea();
00054
00056
00057
00058
00059
00060
00061 void addLayer(vtkQtChartLayer *chart);
00062
00081 void insertLayer(int index, vtkQtChartLayer *chart);
00082
00086 void removeLayer(vtkQtChartLayer *chart);
00087
00092 int getNumberOfLayers() const;
00093
00099 vtkQtChartLayer *getLayer(int index) const;
00100
00106 vtkQtChartLayer *getLayer(const QString &chartName) const;
00107
00112 vtkQtChartAxisLayer *getAxisLayer() const;
00113
00118 int getAxisLayerIndex() const;
00119
00124 int getGridLayerIndex() const;
00126
00128
00129
00130
00131
00132
00133 vtkQtChartInteractor *getInteractor() const;
00134
00142 void setInteractor(vtkQtChartInteractor *interactor);
00143
00148 vtkQtChartContentsSpace *getContentsSpace() const;
00149
00154 vtkQtChartMouseBox *getMouseBox() const;
00155
00161 void startInteractiveResize();
00162
00167 bool isInteractivelyResizing() const;
00168
00170 void finishInteractiveResize();
00172
00177 vtkQtChartStyleManager *getStyleManager() const;
00178
00179 public slots:
00181 void layoutChart();
00182
00184 void updateLayout();
00185
00186 signals:
00188 void delayedLayoutNeeded();
00189
00194 void layerInserted(int index, vtkQtChartLayer *chart);
00195
00200 void removingLayer(int index, vtkQtChartLayer *chart);
00201
00206 void layerRemoved(int index, vtkQtChartLayer *chart);
00207
00208 protected:
00214 virtual bool viewportEvent(QEvent *e);
00215
00219 virtual void resizeEvent(QResizeEvent *e);
00220
00222
00223
00224
00225
00226
00227
00228
00229
00230 virtual void keyPressEvent(QKeyEvent *e);
00231
00235 virtual void mousePressEvent(QMouseEvent *e);
00236
00240 virtual void mouseMoveEvent(QMouseEvent *e);
00241
00245 virtual void mouseReleaseEvent(QMouseEvent *e);
00246
00250 virtual void mouseDoubleClickEvent(QMouseEvent *e);
00251
00255 virtual void wheelEvent(QWheelEvent *e);
00257
00258 private slots:
00260 void handleZoomChange();
00261
00265 void changeCursor(const QCursor &newCursor);
00266
00267 private:
00268 vtkQtChartAreaInternal *Internal;
00269
00270 private:
00271 vtkQtChartArea(const vtkQtChartArea &);
00272 vtkQtChartArea &operator=(const vtkQtChartArea &);
00273 };
00274
00275 #endif