Subversion Repositories OpenInventory

Rev

Rev 256 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 256 Rev 257
1
#ifndef MAINWINDOW_H
1
#ifndef MAINWINDOW_H
2
#define MAINWINDOW_H
2
#define MAINWINDOW_H
3
3
4
4
5
//#include "mysql.h"
5
//#include "mysql.h"
6
6
7
#include "mymodel.h"
7
#include "mymodel.h"
8
#include "settingform.h"
8
#include "settingform.h"
9
#include "delegate.h"
9
#include "delegate.h"
10
// #include "fileform.h"
10
// #include "fileform.h"
11
#include "treedelegateform.h"
11
#include "treedelegateform.h"
12
#include "wmithread.h"
12
#include "wmithread.h"
13
13
14
14
15
#include <QMainWindow>
15
#include <QMainWindow>
16
#include <QStandardItemModel>
16
#include <QStandardItemModel>
17
#include <QStandardItem>
17
#include <QStandardItem>
18
#include <QTreeWidgetItem>
18
#include <QTreeWidgetItem>
19
#include <QTextCodec>
19
#include <QTextCodec>
20
#include <QSqlDatabase>
20
#include <QSqlDatabase>
21
21
22
#include <QtGui>
22
#include <QtGui>
23
#include <QString>
23
#include <QString>
24
#include <QtSql>
24
#include <QtSql>
25
#include <QFont>
25
#include <QFont>
26
#include <QColor>
26
#include <QColor>
27
#include <QItemDelegate>
27
#include <QItemDelegate>
28
#include <QList>
28
#include <QList>
29
#include <QPalette>
29
#include <QPalette>
30
30
31
31
32
32
33
/*
33
/*
34
#include <QSqlField>
34
#include <QSqlField>
35
#include <QSqlRecord>
35
#include <QSqlRecord>
36
#include <QSqlTableModel>
36
#include <QSqlTableModel>
37
#include <QSqlQueryModel>
37
#include <QSqlQueryModel>
38
#include <QTableView>
38
#include <QTableView>
39
#include <QSqlDriverPlugin>
39
#include <QSqlDriverPlugin>
40
#include <QIcon>
40
#include <QIcon>
41
#include <QVariant>
41
#include <QVariant>
42
#include <QProcess>
42
#include <QProcess>
43
#include <QByteArray>
43
#include <QByteArray>
44
*/
44
*/
45
45
46
typedef struct Class {
46
typedef struct Class {
47
        QString name;
47
        QString name;
48
        QString ID;
48
        QString ID;
49
49
50
} TClass;
50
} TClass;
51
51
52
52
53
53
54
typedef struct wmiVideoCard {
54
typedef struct wmiVideoCard {
55
    QString name; // íàçâàíèå âèäåîêàðòû
55
    QString name; // íàçâàíèå âèäåîêàðòû
56
    QString manufacturer; // ïðîèçâîäèòåëü
56
    QString manufacturer; // ïðîèçâîäèòåëü
57
    QString model;
57
    QString model;
58
    int video_ram;
58
    int video_ram;
59
59
60
} TWmiVideoCard;
60
} TWmiVideoCard;
61
61
62
62
63
63
64
64
65
typedef struct wmiMatherBoard {
65
typedef struct wmiMatherBoard {
66
   // QString name; // íàçâàíèå âèäåîêàðòû
66
   // QString name; // íàçâàíèå âèäåîêàðòû
67
    QString manufacturer; // ïðîèçâîäèòåëü
67
    QString manufacturer; // ïðîèçâîäèòåëü
68
    QString model;
68
    QString model;
69
    //int video_ram;
69
    //int video_ram;
70
70
71
} TWmiMatherBoard;
71
} TWmiMatherBoard;
72
72
73
73
74
typedef struct wmiProcessor {
74
typedef struct wmiProcessor {
75
    QString name; // íàçâàíèå ïðîöåññîðà
75
    QString name; // íàçâàíèå ïðîöåññîðà
76
    QString manufacturer; // ïðîèçâîäèòåëü
76
    QString manufacturer; // ïðîèçâîäèòåëü
77
    int clockSpeed;
77
    int clockSpeed;
78
    QString socket;
78
    QString socket;
79
79
80
    //int video_ram;
80
    //int video_ram;
81
81
82
} TWmiProcessor;
82
} TWmiProcessor;
83
83
84
84
85
typedef struct wmiMemoryModul {
85
typedef struct wmiMemoryModul {
86
    QString bankLabel; // íîìåð áàíêè
86
    QString bankLabel; // íîìåð áàíêè
87
    int capacity; // ðàçìåð
87
    int capacity; // ðàçìåð
88
88
89
} TWmiMemoryModul;
89
} TWmiMemoryModul;
90
90
91
typedef struct wmiHDD {
91
typedef struct wmiHDD {
92
    QString caption; // íàèìåíîâàíèå äèñêà
92
    QString caption; // íàèìåíîâàíèå äèñêà
93
    long size; // ðàçìåð
93
    long size; // ðàçìåð
94
    QString manufacturer; // ïðîèçâîäèòåëü
94
    QString manufacturer; // ïðîèçâîäèòåëü
95
    QString serialNumber; // ñåðèéíûé íîìåð äèñêà
95
    QString serialNumber; // ñåðèéíûé íîìåð äèñêà
96
    QString deviceID; // èäåíòèôèêàòîð äèñêà â ñèñòåìå
96
    QString deviceID; // èäåíòèôèêàòîð äèñêà â ñèñòåìå
97
97
98
} TWmiHDD;
98
} TWmiHDD;
99
99
100
typedef struct hddSerialNumber {
100
typedef struct hddSerialNumber {
101
    QString serialNumber; // ñåðèéíûé íîìåð äèñêà
101
    QString serialNumber; // ñåðèéíûé íîìåð äèñêà
102
    QString deviceID; // èäåíòèôèêàòîð äèñêà â ñèñòåìå
102
    QString deviceID; // èäåíòèôèêàòîð äèñêà â ñèñòåìå
103
103
104
} ThddSerialNumber;
104
} ThddSerialNumber;
105
105
106
106
107
107
108
typedef struct wmiCDROM {
108
typedef struct wmiCDROM {
109
    QString name; // íàçâàíèå âèäåîêàðòû
109
    QString name; // íàçâàíèå âèäåîêàðòû
110
    QString manufacturer; // ïðîèçâîäèòåëü
110
    QString manufacturer; // ïðîèçâîäèòåëü
111
111
112
} TWmiCDROM;
112
} TWmiCDROM;
113
113
114
114
115
typedef struct wmiNetCard {
115
typedef struct wmiNetCard {
116
    QString caption; // íàçâàíèå âèäåîêàðòû
116
    QString caption; // íàçâàíèå âèäåîêàðòû
117
    QString  MACAddress; // ïðîèçâîäèòåëü
117
    QString  MACAddress; // ïðîèçâîäèòåëü
118
118
119
} TWmiNetCard;
119
} TWmiNetCard;
120
120
-
 
121
typedef struct wmiSoundCard {
-
 
122
    QString caption; // íàçâàíèå âèäåîêàðòû
-
 
123
 //   QString  MACAddress; // ïðîèçâîäèòåëü
121
124
-
 
125
} TWmiSoundCard;
122
126
123
namespace Ui {
127
namespace Ui {
124
    class MainWindow;
128
    class MainWindow;
125
}
129
}
126
130
127
class MainWindow : public QMainWindow {
131
class MainWindow : public QMainWindow {
128
    Q_OBJECT
132
    Q_OBJECT
129
public:
133
public:
130
    MainWindow(QWidget *parent = 0);
134
    MainWindow(QWidget *parent = 0);
131
    ~MainWindow();
135
    ~MainWindow();
132
136
133
protected:
137
protected:
134
    void changeEvent(QEvent *e);
138
    void changeEvent(QEvent *e);
135
139
136
private:
140
private:
137
    Ui::MainWindow *ui;
141
    Ui::MainWindow *ui;
138
    //FileForm fileForm;
142
    //FileForm fileForm;
139
143
140
volatile bool all_reading;
144
volatile bool all_reading;
141
145
142
    TreeDelegateForm treeForm;
146
    TreeDelegateForm treeForm;
143
147
144
        settingForm setFrm;
148
        settingForm setFrm;
145
//ïåðåìåííûå äëÿ ñîåäèíåíèÿ ñ áàçîé
149
//ïåðåìåííûå äëÿ ñîåäèíåíèÿ ñ áàçîé
146
        QString baseName;
150
        QString baseName;
147
        QString hostName;
151
        QString hostName;
148
        QString userName;
152
        QString userName;
149
        QString password;
153
        QString password;
150
        QString tableName;
154
        QString tableName;
151
155
152
        void readSettings();
156
        void readSettings();
153
        void writeSettings();
157
        void writeSettings();
154
158
155
159
156
    QProcess wmiProcess;
160
    QProcess wmiProcess;
157
    QList<QTreeWidgetItem *> root_items_list;
161
    QList<QTreeWidgetItem *> root_items_list;
158
    QStandardItemModel *model;
162
    QStandardItemModel *model;
159
    QStandardItem *item;
163
    QStandardItem *item;
160
    QTreeWidgetItem *rootItem1, *rootItem2;
164
    QTreeWidgetItem *rootItem1, *rootItem2;
161
    void openBase();
165
    void openBase();
162
    bool readModel();
166
    bool readModel();
163
167
164
    void initWmiTree();
168
    void initWmiTree();
165
169
166
    void setupModelData(const QStringList &lines, QTreeWidgetItem *parent, int row, QString model_id); // row - íîìåð ñòðîêè â òàáëèöå ìîäåëåé, ñîîòâåòñòâóþùèé äàííîé ìîäåëè
170
    void setupModelData(const QStringList &lines, QTreeWidgetItem *parent, int row, QString model_id); // row - íîìåð ñòðîêè â òàáëèöå ìîäåëåé, ñîîòâåòñòâóþùèé äàííîé ìîäåëè
167
    QString creatModelString(QTreeWidgetItem* model);
171
    QString creatModelString(QTreeWidgetItem* model);
168
    QString modelString; // ñòðîêà, îïèñûâàþùàÿ ìîäåëü ïðåäñòàâëåíèÿ
172
    QString modelString; // ñòðîêà, îïèñûâàþùàÿ ìîäåëü ïðåäñòàâëåíèÿ
169
    void addChildsString(QTreeWidgetItem *parentItem, int level);
173
    void addChildsString(QTreeWidgetItem *parentItem, int level);
170
174
171
    QSqlDatabase sql;
175
    QSqlDatabase sql;
172
    bool model_is_build; // ôëàã ãîâîðèò, ïîñòðîåíà ëè ìîäêëü (true) èëè íåò  (false)
176
    bool model_is_build; // ôëàã ãîâîðèò, ïîñòðîåíà ëè ìîäêëü (true) èëè íåò  (false)
173
177
174
    bool openDataBase();
178
    bool openDataBase();
175
    bool buildPreviewModel(QString modelName, QString rootClassID);
179
    bool buildPreviewModel(QString modelName, QString rootClassID);
176
180
177
    bool rebuildPreviewModel(QTreeWidgetItem* root_item, QString rootClassID, int row);
181
    bool rebuildPreviewModel(QTreeWidgetItem* root_item, QString rootClassID, int row);
178
182
179
    QString ClassName(QString class_id); //âîçâðàùàåò èìÿ êëàññà ïî åãî ID
183
    QString ClassName(QString class_id); //âîçâðàùàåò èìÿ êëàññà ïî åãî ID
180
    void addChildsItems(QTreeWidgetItem *perent_class_item, int row); // äîáîâëÿåì ê ýëåìåíòó äåðåâà â êà÷åñòâå äî÷åðíèõ ýëåìåíòîâ âñå êëàññû, äëÿ êîòîðûõ êëàññ ýëåìåíòà ÿâëÿåòñÿ êîíòåéíåðîì
184
    void addChildsItems(QTreeWidgetItem *perent_class_item, int row); // äîáîâëÿåì ê ýëåìåíòó äåðåâà â êà÷åñòâå äî÷åðíèõ ýëåìåíòîâ âñå êëàññû, äëÿ êîòîðûõ êëàññ ýëåìåíòà ÿâëÿåòñÿ êîíòåéíåðîì
181
    QStringList classChields(QString class_id);
185
    QStringList classChields(QString class_id);
182
    QMap <QString, QString> getClassList(); // ïîëó÷àåì ñïèñîê êëàññîâ
186
    QMap <QString, QString> getClassList(); // ïîëó÷àåì ñïèñîê êëàññîâ
183
    QMap <QString, QString> getFieldsList(QString class_id); // ïîëó÷àåì ñïèñîê ïîëåé êëàññà
187
    QMap <QString, QString> getFieldsList(QString class_id); // ïîëó÷àåì ñïèñîê ïîëåé êëàññà
184
    void initComboBox();
188
    void initComboBox();
185
    QList<QTreeWidgetItem *> rootItems; // ñïèñîê óêàçàòåëåé êîðíåâûõ óçëîâ (ìîäåëåé)
189
    QList<QTreeWidgetItem *> rootItems; // ñïèñîê óêàçàòåëåé êîðíåâûõ óçëîâ (ìîäåëåé)
186
    TWmiVideoCard getWmiVideoGard(QString host, QString user_name, QString password);
190
    TWmiVideoCard getWmiVideoGard(QString host, QString user_name, QString password);
187
    TWmiMatherBoard getWmiMatherBoard(QString host, QString user_name, QString password);
191
    TWmiMatherBoard getWmiMatherBoard(QString host, QString user_name, QString password);
188
    TWmiProcessor getWmiProcessor(QString host, QString user_name, QString password);
192
    TWmiProcessor getWmiProcessor(QString host, QString user_name, QString password);
189
    QList<TWmiMemoryModul> getWmiRAM(QString host, QString user_name, QString password);
193
    QList<TWmiMemoryModul> getWmiRAM(QString host, QString user_name, QString password);
190
    QList<TWmiHDD> getWmiHDD(QString host, QString user_name, QString password);
194
    QList<TWmiHDD> getWmiHDD(QString host, QString user_name, QString password);
191
    QList<ThddSerialNumber> getHDDSerNum(QString host, QString user_name, QString password);
195
    QList<ThddSerialNumber> getHDDSerNum(QString host, QString user_name, QString password);
192
196
193
    QList<TWmiCDROM> getWmiCDROM(QString host, QString user_name, QString password);
197
    QList<TWmiCDROM> getWmiCDROM(QString host, QString user_name, QString password);
194
    QList<TWmiNetCard> getWmiNetCard(QString host, QString user_name, QString password);
198
    QList<TWmiNetCard> getWmiNetCard(QString host, QString user_name, QString password);
-
 
199
    QList<TWmiSoundCard> getWmiSoundCard(QString host, QString user_name, QString password);
195
200
196
201
197
202
198
203
199
204
200
205
201
    WmiThread wmiThread;
206
    WmiThread wmiThread;
202
    /////// QSqlTableModel * sql_mogel;
207
    /////// QSqlTableModel * sql_mogel;
203
208
204
    MyModel  * sql_mogel;
209
    MyModel  * sql_mogel;
205
 ////   MyModel * filter_model;
210
 ////   MyModel * filter_model;
206
211
207
    QSqlTableModel * filter_model;
212
    QSqlTableModel * filter_model;
208
213
209
    QSqlTableModel * model_for_ListModelsTable;
214
    QSqlTableModel * model_for_ListModelsTable;
210
215
211
    void initListModelsTablle();
216
    void initListModelsTablle();
212
    void readModels(); // ñ÷èòûâàåì ñïèñîê ìîäåëåé èç áàçû äàííûõ è ñòðîèì äåðåâî ìîäåëåé
217
    void readModels(); // ñ÷èòûâàåì ñïèñîê ìîäåëåé èç áàçû äàííûõ è ñòðîèì äåðåâî ìîäåëåé
213
218
214
    int pointer_index; //èíäåêñ ïîëÿ-óêàçàòåëÿ íà ðîäèòåëüñêèé êëàññ
219
    int pointer_index; //èíäåêñ ïîëÿ-óêàçàòåëÿ íà ðîäèòåëüñêèé êëàññ
215
    QString parentObject_id;
220
    QString parentObject_id;
216
221
217
222
218
    QMap <QString, QString> class_list_map;
223
    QMap <QString, QString> class_list_map;
219
    QMap <int, QTreeWidgetItem*> models_items; // ñïèñîê èòåìîâ (êîðíåâûõ )ìîäåëåé è ñîîòâåòñòâóþùèõ èì ñòðîê â òàáëèöå ìîäåëåé
224
    QMap <int, QTreeWidgetItem*> models_items; // ñïèñîê èòåìîâ (êîðíåâûõ )ìîäåëåé è ñîîòâåòñòâóþùèõ èì ñòðîê â òàáëèöå ìîäåëåé
220
    void getDatabaseData();
225
    void getDatabaseData();
221
    void buildTree(QTreeWidgetItem * model_item);
226
    void buildTree(QTreeWidgetItem * model_item);
222
    QString getClassInctance(QString class_id); // ïîëó÷àåì èìÿ òàáëèöû - õðàíèëèùà îáúåêòîâ êëàññà
227
    QString getClassInctance(QString class_id); // ïîëó÷àåì èìÿ òàáëèöû - õðàíèëèùà îáúåêòîâ êëàññà
223
    void showClassObjects(QTreeWidgetItem * parent_item, QTreeWidgetItem * model_item); // îòîáðàçèì îáúåêòû êëàññîâà
228
    void showClassObjects(QTreeWidgetItem * parent_item, QTreeWidgetItem * model_item); // îòîáðàçèì îáúåêòû êëàññîâà
224
    void showObjectChildrens(QString object_ID, QTreeWidgetItem * object_item, QTreeWidgetItem * model_item); // îòîáðàçèì îáúåêòû êëàññîâà
229
    void showObjectChildrens(QString object_ID, QTreeWidgetItem * object_item, QTreeWidgetItem * model_item); // îòîáðàçèì îáúåêòû êëàññîâà
225
    void showObjects(QTreeWidgetItem * parent_object_item, QTreeWidgetItem * model_item, QString filtr);// // îòîáðàçèì îáúåêòû êëàññîâà
230
    void showObjects(QTreeWidgetItem * parent_object_item, QTreeWidgetItem * model_item, QString filtr);// // îòîáðàçèì îáúåêòû êëàññîâà
226
    QString getPointerFieldName(QString parent_class_id, QString chield_class_id); // îïðåäåëÿåì èìÿ ïîëÿ, â êîòîðîì õðÿíÿòñÿ óêàçàòåëè íà îáúåêòû ðîäèòåëüñêîãî êëàññà
231
    QString getPointerFieldName(QString parent_class_id, QString chield_class_id); // îïðåäåëÿåì èìÿ ïîëÿ, â êîòîðîì õðÿíÿòñÿ óêàçàòåëè íà îáúåêòû ðîäèòåëüñêîãî êëàññà
227
232
228
    QMap <QString, QString> getPointersList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé-óêàçàòåëåé, â êà÷åñòâå êëþ÷åé ïîëó÷èì èìåíà ïîëåé-óêàçàòåëåé
233
    QMap <QString, QString> getPointersList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé-óêàçàòåëåé, â êà÷åñòâå êëþ÷åé ïîëó÷èì èìåíà ïîëåé-óêàçàòåëåé
229
                                                                // â êà÷åñòâå çíà÷åíèé ïîëó÷èì ñïèñîê òàáëèö-õðàíèëèù îáúåêòîâ ðîäèòåëüñêèõ êëàññîâ
234
                                                                // â êà÷åñòâå çíà÷åíèé ïîëó÷èì ñïèñîê òàáëèö-õðàíèëèù îáúåêòîâ ðîäèòåëüñêèõ êëàññîâ
230
235
231
236
232
    QMap <QString, QPixmap> getClassesIcons(); // ïîëó÷àåì ñïèñîê èêîíîê äëÿ êëàññîâ
237
    QMap <QString, QPixmap> getClassesIcons(); // ïîëó÷àåì ñïèñîê èêîíîê äëÿ êëàññîâ
233
                                                // â êà÷åñòâå êëþ÷à ïîëó÷èì ID êëàññà, à â êà÷åñòâå çíà÷åíèé - èçîáðàæåíèÿ èêîíîê
238
                                                // â êà÷åñòâå êëþ÷à ïîëó÷èì ID êëàññà, à â êà÷åñòâå çíà÷åíèé - èçîáðàæåíèÿ èêîíîê
234
239
235
240
236
    QMap <QString, QPixmap> getObjectsIcon(QString inctance); // ïîëó÷àåì ñïèñîê èêîíîê äëÿ îáúåêòîâ
241
    QMap <QString, QPixmap> getObjectsIcon(QString inctance); // ïîëó÷àåì ñïèñîê èêîíîê äëÿ îáúåêòîâ
237
    // â êà÷åñòâå êëþ÷à ïîëó÷èì ID îáúåêòà, à â êà÷åñòâå çíà÷åíèé - èçîáðàæåíèÿ èêîíîê
242
    // â êà÷åñòâå êëþ÷à ïîëó÷èì ID îáúåêòà, à â êà÷åñòâå çíà÷åíèé - èçîáðàæåíèÿ èêîíîê
238
243
239
244
240
    QStringList getDataFieldList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé c òèïîì "Äàòà"
245
    QStringList getDataFieldList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé c òèïîì "Äàòà"
241
246
242
247
243
248
244
    QStringList getBoolFieldList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé c òèïîì "bool"
249
    QStringList getBoolFieldList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé c òèïîì "bool"
245
250
246
251
247
    QStringList getFileFieldList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé, â êîòîðûõ õðàíÿòüñÿ ôàéëû"
252
    QStringList getFileFieldList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé, â êîòîðûõ õðàíÿòüñÿ ôàéëû"
248
253
249
254
250
    QString getFiltrString(QString model_id, QString class_id); // ïîëó÷àåì ñòðîêó-ôèëüòð äëÿ äàííîãî êëàññà äàííîé ìîäåëè
255
    QString getFiltrString(QString model_id, QString class_id); // ïîëó÷àåì ñòðîêó-ôèëüòð äëÿ äàííîãî êëàññà äàííîé ìîäåëè
251
256
252
257
253
    QList<TField> getFieldList(QString class_id);// ïîëó÷àåì ñïèñîê ïîëåé êëàññà
258
    QList<TField> getFieldList(QString class_id);// ïîëó÷àåì ñïèñîê ïîëåé êëàññà
254
259
255
260
256
    int getIconFieldIndex(QString inctance); // ïîëó÷àåì íîìåð ñòîëáöà ñ èêîíêàìè
261
    int getIconFieldIndex(QString inctance); // ïîëó÷àåì íîìåð ñòîëáöà ñ èêîíêàìè
257
262
258
263
259
    void buildReport(bool advanced); // ñîçäàåì îò÷åò è ýêñïîðòèðóåì â OpenOffice, ïåðåìåííàÿ advanced óêàçûâàåò áóäåò ëè îò÷åò ðàñøèðåííûì
264
    void buildReport(bool advanced); // ñîçäàåì îò÷åò è ýêñïîðòèðóåì â OpenOffice, ïåðåìåííàÿ advanced óêàçûâàåò áóäåò ëè îò÷åò ðàñøèðåííûì
260
    // QTreeWidgetItem * model_item
265
    // QTreeWidgetItem * model_item
261
266
262
    void getReport(QTreeWidgetItem * model_item, bool advanced); // ñîçäàåò îò÷åò äëÿ êîíêðåòíîé ìîäåëè ïåðåìåííàÿ advanced óêàçûâàåò áóäåò ëè îò÷åò ðàñøèðåííûì
267
    void getReport(QTreeWidgetItem * model_item, bool advanced); // ñîçäàåò îò÷åò äëÿ êîíêðåòíîé ìîäåëè ïåðåìåííàÿ advanced óêàçûâàåò áóäåò ëè îò÷åò ðàñøèðåííûì
263
268
264
    void printChild(QTreeWidgetItem * model_item, QString filtr, bool advanced, int pos);//â ðàïîðò äîáàâëÿåì äî÷åðíèå êëàññû
269
    void printChild(QTreeWidgetItem * model_item, QString filtr, bool advanced, int pos);//â ðàïîðò äîáàâëÿåì äî÷åðíèå êëàññû
265
270
266
    void newPage(int page_number);//â ðàïîðò âñòàâëÿåì íîâóþ ñòðàíèöó
271
    void newPage(int page_number);//â ðàïîðò âñòàâëÿåì íîâóþ ñòðàíèöó
267
    void newPage();//â ðàïîðò âñòàâëÿåì íîâóþ ñòðàíèöó
272
    void newPage();//â ðàïîðò âñòàâëÿåì íîâóþ ñòðàíèöó
268
273
269
    SpinBoxDelegate spinDelegate;
274
    SpinBoxDelegate spinDelegate;
270
    QItemDelegate standart_delegate;
275
    QItemDelegate standart_delegate;
271
    CPictureDelegate * picture_delegate;
276
    CPictureDelegate * picture_delegate;
272
    IconDelegate * iconDelegate;
277
    IconDelegate * iconDelegate;
273
    FileDelegate * fileDelegate; // äåëåãàò äëÿ òàáëèöû ñ ôèëüòðàìè, áóäåò îòîáðàæàòü ñïèñîê ïîëåé êëàññà
278
    FileDelegate * fileDelegate; // äåëåãàò äëÿ òàáëèöû ñ ôèëüòðàìè, áóäåò îòîáðàæàòü ñïèñîê ïîëåé êëàññà
274
    FilterSpinBoxDelegate filterSpinDelegate;
279
    FilterSpinBoxDelegate filterSpinDelegate;
275
    FilterConditionDelegate filterConditionDelegate, filterConditionDelegate_1, filterConditionDelegate_2;
280
    FilterConditionDelegate filterConditionDelegate, filterConditionDelegate_1, filterConditionDelegate_2;
276
    FilterValueDelegate filterValueDelegate; // äåëåãàò äëÿ òàáëèöû ñ ôèëüòðàìè, áóäåò îòîáðàæàòü ñïèñîê çíà÷åíèé îáúåêòîâ êëàññà
281
    FilterValueDelegate filterValueDelegate; // äåëåãàò äëÿ òàáëèöû ñ ôèëüòðàìè, áóäåò îòîáðàæàòü ñïèñîê çíà÷åíèé îáúåêòîâ êëàññà
277
282
278
    bool comboBox_slot_enable; // äëÿ áëîêèðîâêè ñëîòà, êîãäà ìåíÿåì item_index èç ïðîãðàììû, à íå âðó÷íóþ
283
    bool comboBox_slot_enable; // äëÿ áëîêèðîâêè ñëîòà, êîãäà ìåíÿåì item_index èç ïðîãðàììû, à íå âðó÷íóþ
279
    QList <int> boolFieldsIndexes_global; // ñïèñîê íîìåðîâ ñòîëáöîâ ñ òèïîì "BOOL"
284
    QList <int> boolFieldsIndexes_global; // ñïèñîê íîìåðîâ ñòîëáöîâ ñ òèïîì "BOOL"
280
285
281
    QMap <QString, QPixmap> classesIcons;
286
    QMap <QString, QPixmap> classesIcons;
282
287
283
    QTextDocument * doc;
288
    QTextDocument * doc;
284
    QTextCursor * cursor;
289
    QTextCursor * cursor;
285
290
286
291
287
292
288
private slots:
293
private slots:
289
    void on_comboBox_currentIndexChanged( int index );
294
    void on_comboBox_currentIndexChanged( int index );
290
    void on_treeWidget_itemChanged ( QTreeWidgetItem * item, int column );
295
    void on_treeWidget_itemChanged ( QTreeWidgetItem * item, int column );
291
    void on_treeWidget_itemClicked ( QTreeWidgetItem * item, int column );
296
    void on_treeWidget_itemClicked ( QTreeWidgetItem * item, int column );
292
    void on_treeWidget_2_itemClicked ( QTreeWidgetItem * item, int column );
297
    void on_treeWidget_2_itemClicked ( QTreeWidgetItem * item, int column );
293
    void on_pushButton_clicked(); // íàæàòèå êíîïêè "Äîáàâèòü îáúåêò"
298
    void on_pushButton_clicked(); // íàæàòèå êíîïêè "Äîáàâèòü îáúåêò"
294
    void on_pushButton_2_clicked();// íàæàòèå êíîïêè "Óäàëèòü âûäåëåííûå îáúåêòû"
299
    void on_pushButton_2_clicked();// íàæàòèå êíîïêè "Óäàëèòü âûäåëåííûå îáúåêòû"
295
    void on_pushButton_3_clicked();// íàæàòèå êíîïêè "Ïðèìåíèòü"
300
    void on_pushButton_3_clicked();// íàæàòèå êíîïêè "Ïðèìåíèòü"
296
    void on_pushButton_4_clicked();// íàæàòèå êíîïêè "Ñáðîñèòü èçìåíåíèÿ"
301
    void on_pushButton_4_clicked();// íàæàòèå êíîïêè "Ñáðîñèòü èçìåíåíèÿ"
297
    void on_pushButton_5_clicked();// íàæàòèå êíîïêè "Äîáàâèòü ìîäåëü "
302
    void on_pushButton_5_clicked();// íàæàòèå êíîïêè "Äîáàâèòü ìîäåëü "
298
    void on_pushButton_6_clicked();// íàæàòèå êíîïêè "Óäàëèòü ìîäåëü "
303
    void on_pushButton_6_clicked();// íàæàòèå êíîïêè "Óäàëèòü ìîäåëü "
299
    void on_pushButton_7_clicked();// íàæàòèå êíîïêè "Ïðèìåíèòü" (íà âêëàäêå ìîäåëåé)
304
    void on_pushButton_7_clicked();// íàæàòèå êíîïêè "Ïðèìåíèòü" (íà âêëàäêå ìîäåëåé)
300
    void on_pushButton_8_clicked();// íàæàòèå êíîïêè "Îòìåíèòü" (íà âêëàäêå ìîäåëåé)
305
    void on_pushButton_8_clicked();// íàæàòèå êíîïêè "Îòìåíèòü" (íà âêëàäêå ìîäåëåé)
301
    void on_pushButton_9_clicked();// íàæàòèå êíîïêè "Äîáàâèòü ôèëüòð" (íà âêëàäêå ôèëüòðîâ)
306
    void on_pushButton_9_clicked();// íàæàòèå êíîïêè "Äîáàâèòü ôèëüòð" (íà âêëàäêå ôèëüòðîâ)
302
    void on_pushButton_10_clicked();// íàæàòèå êíîïêè "Óäàëèòü ôèëüòð" (íà âêëàäêå ôèëüòðîâ)
307
    void on_pushButton_10_clicked();// íàæàòèå êíîïêè "Óäàëèòü ôèëüòð" (íà âêëàäêå ôèëüòðîâ)
303
    void on_pushButton_11_clicked();// íàæàòèå êíîïêè "Ïðèìåíèòü" (íà âêëàäêå ôèëüòðîâ)
308
    void on_pushButton_11_clicked();// íàæàòèå êíîïêè "Ïðèìåíèòü" (íà âêëàäêå ôèëüòðîâ)
304
    void on_pushButton_12_clicked();// íàæàòèå êíîïêè "Ñáðîñèòü èçìåíåíèÿ" (íà âêëàäêå ôèëüòðîâ)
309
    void on_pushButton_12_clicked();// íàæàòèå êíîïêè "Ñáðîñèòü èçìåíåíèÿ" (íà âêëàäêå ôèëüòðîâ)
305
    void on_pushButton_13_clicked();// íàæàòèå êíîïêè "Ñôîðìèðîâàòü êðàòêèé îò÷åò" (íà âêëàäêå îò÷åòîâ)
310
    void on_pushButton_13_clicked();// íàæàòèå êíîïêè "Ñôîðìèðîâàòü êðàòêèé îò÷åò" (íà âêëàäêå îò÷åòîâ)
306
    void on_pushButton_14_clicked();// íàæàòèå êíîïêè "Ñôîðìèðîâàòü ïîëíûé îò÷åò" (íà âêëàäêå îò÷åòîâ)
311
    void on_pushButton_14_clicked();// íàæàòèå êíîïêè "Ñôîðìèðîâàòü ïîëíûé îò÷åò" (íà âêëàäêå îò÷åòîâ)
307
    void on_pushButton_15_clicked();// íàæàòèå êíîïêè "Ïå÷àòü" (íà âêëàäêå îò÷åòîâ)
312
    void on_pushButton_15_clicked();// íàæàòèå êíîïêè "Ïå÷àòü" (íà âêëàäêå îò÷åòîâ)
308
    void on_pushButton_16_clicked();// íàæàòèå êíîïêè "Ïå÷àòü â PDF" (íà âêëàäêå îò÷åòîâ)
313
    void on_pushButton_16_clicked();// íàæàòèå êíîïêè "Ïå÷àòü â PDF" (íà âêëàäêå îò÷åòîâ)
309
    void on_pushButton_17_clicked();// íàæàòèå êíîïêè "Ýêñïîðò â OpenOffice" (íà âêëàäêå îò÷åòîâ)
314
    void on_pushButton_17_clicked();// íàæàòèå êíîïêè "Ýêñïîðò â OpenOffice" (íà âêëàäêå îò÷åòîâ)
310
    void on_pushButton_18_clicked();// íàæàòèå êíîïêè "Ýêñïîðò â OpenOffice" (íà âêëàäêå îò÷åòîâ)
315
    void on_pushButton_18_clicked();// íàæàòèå êíîïêè "Ýêñïîðò â OpenOffice" (íà âêëàäêå îò÷åòîâ)
311
316
312
317
313
    void on_sql_mogel_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
318
    void on_sql_mogel_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
314
    void on_model_for_ListModelsTable_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
319
    void on_model_for_ListModelsTable_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
315
    void on_filter_model_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); // èçìåíèëè ñâîéñòâà ôèëüòðà èëè äîáàâèëè íîâûé ôèëüòð
320
    void on_filter_model_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); // èçìåíèëè ñâîéñòâà ôèëüòðà èëè äîáàâèëè íîâûé ôèëüòð
316
    void applySetting();
321
    void applySetting();
317
    void getSetting(); // îòêðîåì îêíî íàñòðîåê
322
    void getSetting(); // îòêðîåì îêíî íàñòðîåê
318
    void readStandartProcessOutput();
323
    void readStandartProcessOutput();
319
    void readStandartProcessError();
324
    void readStandartProcessError();
320
325
321
326
322
327
323
328
324
};
329
};
325
330
326
331
327
332
328
333
329
#endif // MAINWINDOW_H
334
#endif // MAINWINDOW_H
330
 
335