К новейшей редакции | Содержимое файла | Последнее изменение | Открыть журнал | RSS
Редакция | Автор | № строки | Строка |
---|---|---|---|
66 | pingvin | 1 | #ifndef DELEGATEFORCLASSESTABLE_H |
2 | #define DELEGATEFORCLASSESTABLE_H |
||
3 | |||
4 | |||
5 | #include <QItemDelegate> |
||
6 | #include <QModelIndex> |
||
7 | #include <QObject> |
||
8 | #include <QSize> |
||
9 | #include <QSpinBox> |
||
10 | |||
11 | class DelegateForClassesTable : public QItemDelegate |
||
12 | { |
||
13 | Q_OBJECT |
||
14 | public: |
||
15 | explicit DelegateForClassesTable(QObject *parent = 0); |
||
16 | |||
17 | QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, |
||
18 | const QModelIndex &index) const; |
||
19 | |||
20 | void setEditorData(QWidget *editor, const QModelIndex &index) const; |
||
21 | void setModelData(QWidget *editor, QAbstractItemModel *model, |
||
22 | const QModelIndex &index) const; |
||
23 | |||
24 | void updateEditorGeometry(QWidget *editor, |
||
25 | const QStyleOptionViewItem &option, const QModelIndex &index) const; |
||
26 | |||
27 | private: |
||
28 | QStringList items; |
||
29 | |||
30 | signals: |
||
31 | |||
32 | public slots: |
||
33 | |||
34 | }; |
||
35 | |||
36 | |||
37 | |||
38 | |||
39 | |||
40 | #endif // DELEGATEFORCLASSESTABLE_H |