Хранилища Subversion OpenInventory

Редакция

Редакция 66 | Только различия | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS

Редакция 66 Редакция 67
1
#ifndef DELEGATEFORCLASSESTABLE_H
1
#ifndef DELEGATEFORCLASSESTABLE_H
2
#define DELEGATEFORCLASSESTABLE_H
2
#define DELEGATEFORCLASSESTABLE_H
3
3
4
4
5
#include <QItemDelegate>
5
#include <QItemDelegate>
6
#include <QModelIndex>
6
#include <QModelIndex>
7
#include <QObject>
7
#include <QObject>
8
#include <QSize>
8
#include <QSize>
9
#include <QSpinBox>
9
#include <QSpinBox>
10
10
11
class DelegateForClassesTable : public QItemDelegate
11
class DelegateForClassesTable : public QItemDelegate
12
{
12
{
13
Q_OBJECT
13
Q_OBJECT
14
public:
14
public:
15
    explicit DelegateForClassesTable(QObject *parent = 0);
15
    explicit DelegateForClassesTable(QObject *parent = 0);
16
16
17
    QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
17
    QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
18
                          const QModelIndex &index) const;
18
                          const QModelIndex &index) const;
19
19
20
    void setEditorData(QWidget *editor, const QModelIndex &index) const;
20
    void setEditorData(QWidget *editor, const QModelIndex &index) const;
21
    void setModelData(QWidget *editor, QAbstractItemModel *model,
21
    void setModelData(QWidget *editor, QAbstractItemModel *model,
22
                      const QModelIndex &index) const;
22
                      const QModelIndex &index) const;
23
23
24
    void updateEditorGeometry(QWidget *editor,
24
    void updateEditorGeometry(QWidget *editor,
25
        const QStyleOptionViewItem &option, const QModelIndex &index) const;
25
        const QStyleOptionViewItem &option, const QModelIndex &index) const;
26
26
-
 
27
    void setItems(QStringList new_items); // äîáàâëÿåì íîâûå ïóíêòû â äåëåãàò
-
 
28
27
private:
29
private:
28
    QStringList items;
30
    QStringList items;
29
31
30
signals:
32
signals:
31
33
32
public slots:
34
public slots:
33
35
34
};
36
};
35
37
36
38
37
39
38
40
39
41
40
#endif // DELEGATEFORCLASSESTABLE_H
42
#endif // DELEGATEFORCLASSESTABLE_H
41
 
43