Subversion Repositories OpenInventory

Rev

Rev 219 | Rev 225 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 219 Rev 224
Line 15... Line 15...
15
#include "iconform.h"
15
#include "iconform.h"
16
#include "fileform.h"
16
#include "fileform.h"
17
17
18
//#include <QMainWindow>
18
//#include <QMainWindow>
19
//! [0]
19
//! [0]
-
 
20
-
 
21
20
class SpinBoxDelegate : public QItemDelegate
22
class SpinBoxDelegate : public QItemDelegate
21
{
23
{
22
    Q_OBJECT
24
    Q_OBJECT
23
25
24
public:
26
public:
Line 52... Line 54...
52
54
53
55
54
56
55
57
56
58
-
 
59
-
 
60
57
class FilterConditionDelegate : public QItemDelegate
61
class FilterConditionDelegate : public QItemDelegate
58
{
62
{
59
    Q_OBJECT
63
    Q_OBJECT
60
64
61
public:
65
public:
Line 63... Line 67...
63
67
64
    QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
68
    QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
65
                          const QModelIndex &index) const;
69
                          const QModelIndex &index) const;
66
70
67
    void setEditorData(QWidget *editor, const QModelIndex &index) const;
71
    void setEditorData(QWidget *editor, const QModelIndex &index) const;
-
 
72
    void setModelData(QWidget *editor, QAbstractItemModel *model,
-
 
73
                      const QModelIndex &index) const;
-
 
74
-
 
75
    void updateEditorGeometry(QWidget *editor,
-
 
76
        const QStyleOptionViewItem &option, const QModelIndex &index) const;
-
 
77
-
 
78
-
 
79
-
 
80
    void setClassID(QString newClassID);
-
 
81
//    void getItems(); // ïîëó÷àåì ñâÿçàííûé ñïèñîê
-
 
82
-
 
83
    void setItems(QStringList new_items){items = new_items;}
-
 
84
-
 
85
-
 
86
private:
-
 
87
-
 
88
-
 
89
    QString class_id; // òàáëèöà-õðàíèëèùå, îòêóäà áóäåì áðàòü ñïèñîê
-
 
90
//    QMap <QString, QString> items; // çäåñü áóäåì õðàíèòü ñâÿçàííûé ñïèñîê èìåò îáúåêòîâ è èõ èäåíòèôèêàòîðîâ ID
-
 
91
    QStringList items; // ñïèñîê
-
 
92
};
-
 
93
-
 
94
-
 
95
-
 
96
class FilterValueDelegate : public QItemDelegate
-
 
97
{
-
 
98
    Q_OBJECT
-
 
99
-
 
100
public:
-
 
101
    FilterValueDelegate(QObject *parent = 0);
-
 
102
-
 
103
    QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
-
 
104
                          const QModelIndex &index) const;
-
 
105
-
 
106
    void setEditorData(QWidget *editor, const QModelIndex &index) const;
68
    void setModelData(QWidget *editor, QAbstractItemModel *model,
107
    void setModelData(QWidget *editor, QAbstractItemModel *model,
69
                      const QModelIndex &index) const;
108
                      const QModelIndex &index) const;
70
109
71
    void updateEditorGeometry(QWidget *editor,
110
    void updateEditorGeometry(QWidget *editor,
72
        const QStyleOptionViewItem &option, const QModelIndex &index) const;
111
        const QStyleOptionViewItem &option, const QModelIndex &index) const;