Rev 129 | 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;} |
21 | |||
128 | pingvin | 22 | private: |
23 | QMap <int, QString> pointers_map; // |
||
24 | // - - |
||
127 | pingvin | 25 | |
158 | pingvin | 26 | QList <int> bolleans_list; // "bool" |
27 | |||
127 | pingvin | 28 | signals: |
29 | |||
30 | public slots: |
||
31 | |||
32 | }; |
||
33 | |||
34 | #endif // MYMODEL_H |