00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00023
00024 #ifndef _vtkQtChartLegendModel_h
00025 #define _vtkQtChartLegendModel_h
00026
00027
00028 #include "vtkQtChartExport.h"
00029 #include <QObject>
00030 #include <QPixmap>
00031 #include <QString>
00032
00033 class vtkQtChartLegendModelInternal;
00034 class vtkQtPointMarker;
00035 class QPen;
00036
00037
00041 class VTKQTCHART_EXPORT vtkQtChartLegendModel : public QObject
00042 {
00043 Q_OBJECT
00044
00045 public:
00049 vtkQtChartLegendModel(QObject *parent=0);
00050 virtual ~vtkQtChartLegendModel();
00051
00058 int addEntry(const QPixmap &icon, const QString &text, bool visible);
00059
00067 int insertEntry(
00068 int index, const QPixmap &icon, const QString &text, bool visible);
00069
00073 void removeEntry(int index);
00074
00076 void removeAllEntries();
00077
00088 void startModifyingData();
00089
00096 void finishModifyingData();
00097
00102 int getNumberOfEntries() const;
00103
00110 int getIndexForId(unsigned int id) const;
00111
00118 QPixmap getIcon(int index) const;
00119
00124 void setIcon(int index, const QPixmap &icon);
00125
00132 QString getText(int index) const;
00133
00138 void setText(int index, const QString &text);
00139
00144 void setVisible(int index, bool visible);
00145
00148 bool getVisible(int index) const;
00149
00150 signals:
00154 void entryInserted(int index);
00155
00159 void removingEntry(int index);
00160
00164 void entryRemoved(int index);
00165
00167 void entriesReset();
00168
00172 void iconChanged(int index);
00173
00177 void textChanged(int index);
00178
00181 void visibilityChanged(int index);
00182
00183 private:
00184 vtkQtChartLegendModelInternal *Internal;
00185 bool InModify;
00186 };
00187
00188 #endif