Subversion Repositories OpenInventory

Rev

Rev 187 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
127 pingvin 1
#ifndef MYMODEL_H
2
#define MYMODEL_H
3
 
4
#include <QObject>
5
#include <QtGui>
6
#include <QSqlQueryModel>
129 pingvin 7
#include <QSqlQuery>
127 pingvin 8
#include <QSqlTableModel>
128 pingvin 9
#include <QMap>
127 pingvin 10
 
11
class MyModel : public QSqlTableModel {
12
Q_OBJECT
13
public:
14
    explicit MyModel(QObject *parent = 0);
15
    Qt::ItemFlags flags(const QModelIndex &index) const;
16
    bool setData(const QModelIndex &, const QVariant &, int);
17
    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
128 pingvin 18
    void setPointers(QMap <int, QString> newPointers){pointers_map = newPointers;}
19
    QMap <int, QString> pointers(){return pointers_map;}
158 pingvin 20
    void setBooleansList(QList <int> newBoolList){bolleans_list = newBoolList;}
187 pingvin 21
    void setIconIndex(int new_index){icon_index = new_index;}
189 pingvin 22
    int iconIndex(){return icon_index;}
158 pingvin 23
 
128 pingvin 24
private:
25
    QMap <int, QString> pointers_map; //             
26
                                  //     -   -    
127 pingvin 27
 
158 pingvin 28
    QList <int> bolleans_list; //     "bool"
187 pingvin 29
    int icon_index; //  ,    
158 pingvin 30
 
127 pingvin 31
signals:
32
 
33
public slots:
34
 
35
};
36
 
37
#endif // MYMODEL_H