Subversion Repositories OpenInventory

Rev

Rev 128 | 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;}
20
private:
21
    QMap <int, QString> pointers_map; //             
22
                                  //     -   -    
127 pingvin 23
 
24
signals:
25
 
26
public slots:
27
 
28
};
29
 
30
#endif // MYMODEL_H