Редакция 85 | Только различия | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 85 | Редакция 86 | ||
---|---|---|---|
1 | #ifndef MODELFORPOINTERS_H
|
1 | #ifndef MODELFORPOINTERS_H
|
2 | #define MODELFORPOINTERS_H
|
2 | #define MODELFORPOINTERS_H
|
3 | 3 | ||
4 | #include <QSqlTableModel>
|
4 | #include <QSqlTableModel>
|
5 | #include <QMainWindow>
|
5 | #include <QMainWindow>
|
6 | #include <QObject>
|
6 | #include <QObject>
|
7 | #include <QtGui>
|
7 | #include <QtGui>
|
8 | #include <QSqlQueryModel>
|
8 | #include <QSqlQueryModel>
|
9 | #include <QSqlTableModel>
|
9 | #include <QSqlTableModel>
|
10 | #include <QSqlQuery>
|
10 | #include <QSqlQuery>
|
11 | 11 | ||
12 | class ModelForPointers : public QSqlTableModel |
12 | class ModelForPointers : public QSqlTableModel |
13 | {
|
13 | {
|
14 | Q_OBJECT |
14 | Q_OBJECT |
15 | public: |
15 | public: |
16 | explicit ModelForPointers(QObject *parent = 0); |
16 | explicit ModelForPointers(QObject *parent = 0); |
17 | Qt::ItemFlags flags(const QModelIndex &index) const; |
17 | Qt::ItemFlags flags(const QModelIndex &index) const; |
18 | bool setData(const QModelIndex &, const QVariant &, int); |
18 | bool setData(const QModelIndex &, const QVariant &, int); |
19 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; |
19 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; |
20 | bool onlySetData(const QModelIndex &, const QVariant &, int); |
20 | bool onlySetData(const QModelIndex &, const QVariant &, int); |
21 | void setInctance(QString currInctatce); // ïåðåäàåì èìÿ òåêóùåé òàáëèöû-õðàíèëèùà |
21 | void setInctance(QString currInctatce); // ïåðåäàåì èìÿ òåêóùåé òàáëèöû-õðàíèëèùà |
22 | signals:
|
22 | signals:
|
23 | - | ||
- | 23 | void field_changed(); |
|
24 | public slots: |
24 | public slots: |
25 | 25 | ||
26 | private: |
26 | private: |
27 | QString Inctance; // èìÿ òàáëèöû-õðàíèëèùà îáúåêòîâ âûäåëåííîãî (â òàáëèöå êëàññîâ) êëàññà |
27 | QString Inctance; // èìÿ òàáëèöû-õðàíèëèùà îáúåêòîâ âûäåëåííîãî (â òàáëèöå êëàññîâ) êëàññà |
28 | 28 | ||
29 | }; |
29 | }; |
30 | 30 | ||
31 | #endif // MODELFORPOINTERS_H
|
31 | #endif // MODELFORPOINTERS_H
|
32 | 32 |