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);
00059
00067 int insertEntry(int index, const QPixmap &icon, const QString &text);
00068
00072 void removeEntry(int index);
00073
00075 void removeAllEntries();
00076
00087 void startModifyingData();
00088
00095 void finishModifyingData();
00096
00101 int getNumberOfEntries() const;
00102
00109 int getIndexForId(unsigned int id) const;
00110
00117 QPixmap getIcon(int index) const;
00118
00123 void setIcon(int index, const QPixmap &icon);
00124
00131 QString getText(int index) const;
00132
00137 void setText(int index, const QString &text);
00138
00139 signals:
00143 void entryInserted(int index);
00144
00148 void removingEntry(int index);
00149
00153 void entryRemoved(int index);
00154
00156 void entriesReset();
00157
00161 void iconChanged(int index);
00162
00166 void textChanged(int index);
00167
00168 private:
00169 vtkQtChartLegendModelInternal *Internal;
00170 bool InModify;
00171 };
00172
00173 #endif