00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00023
00024 #ifndef _vtkQtChartLegendManager_h
00025 #define _vtkQtChartLegendManager_h
00026
00027 #include "vtkQtChartExport.h"
00028 #include <QObject>
00029
00030 class vtkQtChartArea;
00031 class vtkQtChartLayer;
00032 class vtkQtChartLegend;
00033 class vtkQtChartLegendManagerInternal;
00034 class vtkQtChartLegendModel;
00035 class vtkQtChartSeriesLayer;
00036 class vtkQtChartSeriesModel;
00037
00038
00043 class VTKQTCHART_EXPORT vtkQtChartLegendManager : public QObject
00044 {
00045 Q_OBJECT
00046
00047 public:
00051 vtkQtChartLegendManager(QObject *parent=0);
00052 virtual ~vtkQtChartLegendManager();
00053
00055
00056
00057
00058
00059 void setChartArea(vtkQtChartArea *area);
00060
00064 void setChartLegend(vtkQtChartLegend *legend);
00066
00067 public slots:
00072 void insertLayer(int index, vtkQtChartLayer *chart);
00073
00078 void removeLayer(int index, vtkQtChartLayer *chart);
00079
00084 void setLayerVisible(vtkQtChartLayer *chart, bool visible);
00085
00086 private slots:
00091 void changeModel(vtkQtChartSeriesModel *previous,
00092 vtkQtChartSeriesModel *current);
00093
00098 void updateModelEntries(int first, int last);
00099
00101 void insertModelEntries();
00102
00107 void insertModelEntries(int first, int last);
00108
00110 void removeModelEntries();
00111
00116 void removeModelEntries(int first, int last);
00117
00118 private:
00124 int getLegendIndex(vtkQtChartSeriesLayer *chart);
00125
00132 int getLegendIndex(vtkQtChartSeriesModel *model,
00133 vtkQtChartSeriesLayer **chart=0);
00134
00143 void insertLegendEntries(vtkQtChartLegendModel *legend, int index,
00144 vtkQtChartSeriesLayer *chart, vtkQtChartSeriesModel *model,
00145 int first, int last);
00146
00153 void removeLegendEntries(vtkQtChartLegendModel *legend, int index,
00154 int first, int last);
00155
00156 private:
00157 vtkQtChartLegendManagerInternal *Internal;
00158 vtkQtChartArea *Area;
00159 vtkQtChartLegend *Legend;
00160
00161 private:
00162 vtkQtChartLegendManager(const vtkQtChartLegendManager &);
00163 vtkQtChartLegendManager &operator=(const vtkQtChartLegendManager &);
00164 };
00165
00166 #endif