Subversion Repositories OpenInventory

Rev

Rev 127 | Rev 129 | 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>
7
#include <QSqlTableModel>
128 pingvin 8
#include <QMap>
127 pingvin 9
 
10
class MyModel : public QSqlTableModel {
11
Q_OBJECT
12
public:
13
    explicit MyModel(QObject *parent = 0);
14
    Qt::ItemFlags flags(const QModelIndex &index) const;
15
    bool setData(const QModelIndex &, const QVariant &, int);
16
    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
128 pingvin 17
    void setPointers(QMap <int, QString> newPointers){pointers_map = newPointers;}
18
    QMap <int, QString> pointers(){return pointers_map;}
19
private:
20
    QMap <int, QString> pointers_map; //             
21
                                  //     -   -    
127 pingvin 22
 
23
signals:
24
 
25
public slots:
26
 
27
};
28
 
29
#endif // MYMODEL_H