Subversion Repositories OpenInventory

Rev

Rev 255 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 255 Rev 256
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 {
-
 
109
    QString name; // íàçâàíèå âèäåîêàðòû
-
 
110
    QString manufacturer; // ïðîèçâîäèòåëü
-
 
111
-
 
112
} TWmiCDROM;
-
 
113
-
 
114
-
 
115
typedef struct wmiNetCard {
-
 
116
    QString caption; // íàçâàíèå âèäåîêàðòû
-
 
117
    QString  MACAddress; // ïðîèçâîäèòåëü
-
 
118
-
 
119
} TWmiNetCard;
-
 
120
-
 
121
108
122
109
namespace Ui {
123
namespace Ui {
110
    class MainWindow;
124
    class MainWindow;
111
}
125
}
112
126
113
class MainWindow : public QMainWindow {
127
class MainWindow : public QMainWindow {
114
    Q_OBJECT
128
    Q_OBJECT
115
public:
129
public:
116
    MainWindow(QWidget *parent = 0);
130
    MainWindow(QWidget *parent = 0);
117
    ~MainWindow();
131
    ~MainWindow();
118
132
119
protected:
133
protected:
120
    void changeEvent(QEvent *e);
134
    void changeEvent(QEvent *e);
121
135
122
private:
136
private:
123
    Ui::MainWindow *ui;
137
    Ui::MainWindow *ui;
124
    //FileForm fileForm;
138
    //FileForm fileForm;
125
139
126
volatile bool all_reading;
140
volatile bool all_reading;
127
141
128
    TreeDelegateForm treeForm;
142
    TreeDelegateForm treeForm;
129
143
130
        settingForm setFrm;
144
        settingForm setFrm;
131
//ïåðåìåííûå äëÿ ñîåäèíåíèÿ ñ áàçîé
145
//ïåðåìåííûå äëÿ ñîåäèíåíèÿ ñ áàçîé
132
        QString baseName;
146
        QString baseName;
133
        QString hostName;
147
        QString hostName;
134
        QString userName;
148
        QString userName;
135
        QString password;
149
        QString password;
136
        QString tableName;
150
        QString tableName;
137
151
138
        void readSettings();
152
        void readSettings();
139
        void writeSettings();
153
        void writeSettings();
140
154
141
155
142
    QProcess wmiProcess;
156
    QProcess wmiProcess;
143
    QList<QTreeWidgetItem *> root_items_list;
157
    QList<QTreeWidgetItem *> root_items_list;
144
    QStandardItemModel *model;
158
    QStandardItemModel *model;
145
    QStandardItem *item;
159
    QStandardItem *item;
146
    QTreeWidgetItem *rootItem1, *rootItem2;
160
    QTreeWidgetItem *rootItem1, *rootItem2;
147
    void openBase();
161
    void openBase();
148
    bool readModel();
162
    bool readModel();
149
163
150
    void initWmiTree();
164
    void initWmiTree();
151
165
152
    void setupModelData(const QStringList &lines, QTreeWidgetItem *parent, int row, QString model_id); // row - íîìåð ñòðîêè â òàáëèöå ìîäåëåé, ñîîòâåòñòâóþùèé äàííîé ìîäåëè
166
    void setupModelData(const QStringList &lines, QTreeWidgetItem *parent, int row, QString model_id); // row - íîìåð ñòðîêè â òàáëèöå ìîäåëåé, ñîîòâåòñòâóþùèé äàííîé ìîäåëè
153
    QString creatModelString(QTreeWidgetItem* model);
167
    QString creatModelString(QTreeWidgetItem* model);
154
    QString modelString; // ñòðîêà, îïèñûâàþùàÿ ìîäåëü ïðåäñòàâëåíèÿ
168
    QString modelString; // ñòðîêà, îïèñûâàþùàÿ ìîäåëü ïðåäñòàâëåíèÿ
155
    void addChildsString(QTreeWidgetItem *parentItem, int level);
169
    void addChildsString(QTreeWidgetItem *parentItem, int level);
156
170
157
    QSqlDatabase sql;
171
    QSqlDatabase sql;
158
    bool model_is_build; // ôëàã ãîâîðèò, ïîñòðîåíà ëè ìîäêëü (true) èëè íåò  (false)
172
    bool model_is_build; // ôëàã ãîâîðèò, ïîñòðîåíà ëè ìîäêëü (true) èëè íåò  (false)
159
173
160
    bool openDataBase();
174
    bool openDataBase();
161
    bool buildPreviewModel(QString modelName, QString rootClassID);
175
    bool buildPreviewModel(QString modelName, QString rootClassID);
162
176
163
    bool rebuildPreviewModel(QTreeWidgetItem* root_item, QString rootClassID, int row);
177
    bool rebuildPreviewModel(QTreeWidgetItem* root_item, QString rootClassID, int row);
164
178
165
    QString ClassName(QString class_id); //âîçâðàùàåò èìÿ êëàññà ïî åãî ID
179
    QString ClassName(QString class_id); //âîçâðàùàåò èìÿ êëàññà ïî åãî ID
166
    void addChildsItems(QTreeWidgetItem *perent_class_item, int row); // äîáîâëÿåì ê ýëåìåíòó äåðåâà â êà÷åñòâå äî÷åðíèõ ýëåìåíòîâ âñå êëàññû, äëÿ êîòîðûõ êëàññ ýëåìåíòà ÿâëÿåòñÿ êîíòåéíåðîì
180
    void addChildsItems(QTreeWidgetItem *perent_class_item, int row); // äîáîâëÿåì ê ýëåìåíòó äåðåâà â êà÷åñòâå äî÷åðíèõ ýëåìåíòîâ âñå êëàññû, äëÿ êîòîðûõ êëàññ ýëåìåíòà ÿâëÿåòñÿ êîíòåéíåðîì
167
    QStringList classChields(QString class_id);
181
    QStringList classChields(QString class_id);
168
    QMap <QString, QString> getClassList(); // ïîëó÷àåì ñïèñîê êëàññîâ
182
    QMap <QString, QString> getClassList(); // ïîëó÷àåì ñïèñîê êëàññîâ
169
    QMap <QString, QString> getFieldsList(QString class_id); // ïîëó÷àåì ñïèñîê ïîëåé êëàññà
183
    QMap <QString, QString> getFieldsList(QString class_id); // ïîëó÷àåì ñïèñîê ïîëåé êëàññà
170
    void initComboBox();
184
    void initComboBox();
171
    QList<QTreeWidgetItem *> rootItems; // ñïèñîê óêàçàòåëåé êîðíåâûõ óçëîâ (ìîäåëåé)
185
    QList<QTreeWidgetItem *> rootItems; // ñïèñîê óêàçàòåëåé êîðíåâûõ óçëîâ (ìîäåëåé)
172
    TWmiVideoCard getWmiVideoGard(QString host, QString user_name, QString password);
186
    TWmiVideoCard getWmiVideoGard(QString host, QString user_name, QString password);
173
    TWmiMatherBoard getWmiMatherBoard(QString host, QString user_name, QString password);
187
    TWmiMatherBoard getWmiMatherBoard(QString host, QString user_name, QString password);
174
    TWmiProcessor getWmiProcessor(QString host, QString user_name, QString password);
188
    TWmiProcessor getWmiProcessor(QString host, QString user_name, QString password);
175
    QList<TWmiMemoryModul> getWmiRAM(QString host, QString user_name, QString password);
189
    QList<TWmiMemoryModul> getWmiRAM(QString host, QString user_name, QString password);
176
    QList<TWmiHDD> getWmiHDD(QString host, QString user_name, QString password);
190
    QList<TWmiHDD> getWmiHDD(QString host, QString user_name, QString password);
177
    QList<ThddSerialNumber> getHDDSerNum(QString host, QString user_name, QString password);
191
    QList<ThddSerialNumber> getHDDSerNum(QString host, QString user_name, QString password);
178
192
-
 
193
    QList<TWmiCDROM> getWmiCDROM(QString host, QString user_name, QString password);
-
 
194
    QList<TWmiNetCard> getWmiNetCard(QString host, QString user_name, QString password);
-
 
195
-
 
196
-
 
197
-
 
198
-
 
199
179
200
180
    WmiThread wmiThread;
201
    WmiThread wmiThread;
181
    /////// QSqlTableModel * sql_mogel;
202
    /////// QSqlTableModel * sql_mogel;
182
203
183
    MyModel  * sql_mogel;
204
    MyModel  * sql_mogel;
184
 ////   MyModel * filter_model;
205
 ////   MyModel * filter_model;
185
206
186
    QSqlTableModel * filter_model;
207
    QSqlTableModel * filter_model;
187
208
188
    QSqlTableModel * model_for_ListModelsTable;
209
    QSqlTableModel * model_for_ListModelsTable;
189
210
190
    void initListModelsTablle();
211
    void initListModelsTablle();
191
    void readModels(); // ñ÷èòûâàåì ñïèñîê ìîäåëåé èç áàçû äàííûõ è ñòðîèì äåðåâî ìîäåëåé
212
    void readModels(); // ñ÷èòûâàåì ñïèñîê ìîäåëåé èç áàçû äàííûõ è ñòðîèì äåðåâî ìîäåëåé
192
213
193
    int pointer_index; //èíäåêñ ïîëÿ-óêàçàòåëÿ íà ðîäèòåëüñêèé êëàññ
214
    int pointer_index; //èíäåêñ ïîëÿ-óêàçàòåëÿ íà ðîäèòåëüñêèé êëàññ
194
    QString parentObject_id;
215
    QString parentObject_id;
195
216
196
217
197
    QMap <QString, QString> class_list_map;
218
    QMap <QString, QString> class_list_map;
198
    QMap <int, QTreeWidgetItem*> models_items; // ñïèñîê èòåìîâ (êîðíåâûõ )ìîäåëåé è ñîîòâåòñòâóþùèõ èì ñòðîê â òàáëèöå ìîäåëåé
219
    QMap <int, QTreeWidgetItem*> models_items; // ñïèñîê èòåìîâ (êîðíåâûõ )ìîäåëåé è ñîîòâåòñòâóþùèõ èì ñòðîê â òàáëèöå ìîäåëåé
199
    void getDatabaseData();
220
    void getDatabaseData();
200
    void buildTree(QTreeWidgetItem * model_item);
221
    void buildTree(QTreeWidgetItem * model_item);
201
    QString getClassInctance(QString class_id); // ïîëó÷àåì èìÿ òàáëèöû - õðàíèëèùà îáúåêòîâ êëàññà
222
    QString getClassInctance(QString class_id); // ïîëó÷àåì èìÿ òàáëèöû - õðàíèëèùà îáúåêòîâ êëàññà
202
    void showClassObjects(QTreeWidgetItem * parent_item, QTreeWidgetItem * model_item); // îòîáðàçèì îáúåêòû êëàññîâà
223
    void showClassObjects(QTreeWidgetItem * parent_item, QTreeWidgetItem * model_item); // îòîáðàçèì îáúåêòû êëàññîâà
203
    void showObjectChildrens(QString object_ID, QTreeWidgetItem * object_item, QTreeWidgetItem * model_item); // îòîáðàçèì îáúåêòû êëàññîâà
224
    void showObjectChildrens(QString object_ID, QTreeWidgetItem * object_item, QTreeWidgetItem * model_item); // îòîáðàçèì îáúåêòû êëàññîâà
204
    void showObjects(QTreeWidgetItem * parent_object_item, QTreeWidgetItem * model_item, QString filtr);// // îòîáðàçèì îáúåêòû êëàññîâà
225
    void showObjects(QTreeWidgetItem * parent_object_item, QTreeWidgetItem * model_item, QString filtr);// // îòîáðàçèì îáúåêòû êëàññîâà
205
    QString getPointerFieldName(QString parent_class_id, QString chield_class_id); // îïðåäåëÿåì èìÿ ïîëÿ, â êîòîðîì õðÿíÿòñÿ óêàçàòåëè íà îáúåêòû ðîäèòåëüñêîãî êëàññà
226
    QString getPointerFieldName(QString parent_class_id, QString chield_class_id); // îïðåäåëÿåì èìÿ ïîëÿ, â êîòîðîì õðÿíÿòñÿ óêàçàòåëè íà îáúåêòû ðîäèòåëüñêîãî êëàññà
206
227
207
    QMap <QString, QString> getPointersList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé-óêàçàòåëåé, â êà÷åñòâå êëþ÷åé ïîëó÷èì èìåíà ïîëåé-óêàçàòåëåé
228
    QMap <QString, QString> getPointersList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé-óêàçàòåëåé, â êà÷åñòâå êëþ÷åé ïîëó÷èì èìåíà ïîëåé-óêàçàòåëåé
208
                                                                // â êà÷åñòâå çíà÷åíèé ïîëó÷èì ñïèñîê òàáëèö-õðàíèëèù îáúåêòîâ ðîäèòåëüñêèõ êëàññîâ
229
                                                                // â êà÷åñòâå çíà÷åíèé ïîëó÷èì ñïèñîê òàáëèö-õðàíèëèù îáúåêòîâ ðîäèòåëüñêèõ êëàññîâ
209
230
210
231
211
    QMap <QString, QPixmap> getClassesIcons(); // ïîëó÷àåì ñïèñîê èêîíîê äëÿ êëàññîâ
232
    QMap <QString, QPixmap> getClassesIcons(); // ïîëó÷àåì ñïèñîê èêîíîê äëÿ êëàññîâ
212
                                                // â êà÷åñòâå êëþ÷à ïîëó÷èì ID êëàññà, à â êà÷åñòâå çíà÷åíèé - èçîáðàæåíèÿ èêîíîê
233
                                                // â êà÷åñòâå êëþ÷à ïîëó÷èì ID êëàññà, à â êà÷åñòâå çíà÷åíèé - èçîáðàæåíèÿ èêîíîê
213
234
214
235
215
    QMap <QString, QPixmap> getObjectsIcon(QString inctance); // ïîëó÷àåì ñïèñîê èêîíîê äëÿ îáúåêòîâ
236
    QMap <QString, QPixmap> getObjectsIcon(QString inctance); // ïîëó÷àåì ñïèñîê èêîíîê äëÿ îáúåêòîâ
216
    // â êà÷åñòâå êëþ÷à ïîëó÷èì ID îáúåêòà, à â êà÷åñòâå çíà÷åíèé - èçîáðàæåíèÿ èêîíîê
237
    // â êà÷åñòâå êëþ÷à ïîëó÷èì ID îáúåêòà, à â êà÷åñòâå çíà÷åíèé - èçîáðàæåíèÿ èêîíîê
217
238
218
239
219
    QStringList getDataFieldList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé c òèïîì "Äàòà"
240
    QStringList getDataFieldList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé c òèïîì "Äàòà"
220
241
221
242
222
243
223
    QStringList getBoolFieldList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé c òèïîì "bool"
244
    QStringList getBoolFieldList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé c òèïîì "bool"
224
245
225
246
226
    QStringList getFileFieldList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé, â êîòîðûõ õðàíÿòüñÿ ôàéëû"
247
    QStringList getFileFieldList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé, â êîòîðûõ õðàíÿòüñÿ ôàéëû"
227
248
228
249
229
    QString getFiltrString(QString model_id, QString class_id); // ïîëó÷àåì ñòðîêó-ôèëüòð äëÿ äàííîãî êëàññà äàííîé ìîäåëè
250
    QString getFiltrString(QString model_id, QString class_id); // ïîëó÷àåì ñòðîêó-ôèëüòð äëÿ äàííîãî êëàññà äàííîé ìîäåëè
230
251
231
252
232
    QList<TField> getFieldList(QString class_id);// ïîëó÷àåì ñïèñîê ïîëåé êëàññà
253
    QList<TField> getFieldList(QString class_id);// ïîëó÷àåì ñïèñîê ïîëåé êëàññà
233
254
234
255
235
    int getIconFieldIndex(QString inctance); // ïîëó÷àåì íîìåð ñòîëáöà ñ èêîíêàìè
256
    int getIconFieldIndex(QString inctance); // ïîëó÷àåì íîìåð ñòîëáöà ñ èêîíêàìè
236
257
237
258
238
    void buildReport(bool advanced); // ñîçäàåì îò÷åò è ýêñïîðòèðóåì â OpenOffice, ïåðåìåííàÿ advanced óêàçûâàåò áóäåò ëè îò÷åò ðàñøèðåííûì
259
    void buildReport(bool advanced); // ñîçäàåì îò÷åò è ýêñïîðòèðóåì â OpenOffice, ïåðåìåííàÿ advanced óêàçûâàåò áóäåò ëè îò÷åò ðàñøèðåííûì
239
    // QTreeWidgetItem * model_item
260
    // QTreeWidgetItem * model_item
240
261
241
    void getReport(QTreeWidgetItem * model_item, bool advanced); // ñîçäàåò îò÷åò äëÿ êîíêðåòíîé ìîäåëè ïåðåìåííàÿ advanced óêàçûâàåò áóäåò ëè îò÷åò ðàñøèðåííûì
262
    void getReport(QTreeWidgetItem * model_item, bool advanced); // ñîçäàåò îò÷åò äëÿ êîíêðåòíîé ìîäåëè ïåðåìåííàÿ advanced óêàçûâàåò áóäåò ëè îò÷åò ðàñøèðåííûì
242
263
243
    void printChild(QTreeWidgetItem * model_item, QString filtr, bool advanced, int pos);//â ðàïîðò äîáàâëÿåì äî÷åðíèå êëàññû
264
    void printChild(QTreeWidgetItem * model_item, QString filtr, bool advanced, int pos);//â ðàïîðò äîáàâëÿåì äî÷åðíèå êëàññû
244
265
245
    void newPage(int page_number);//â ðàïîðò âñòàâëÿåì íîâóþ ñòðàíèöó
266
    void newPage(int page_number);//â ðàïîðò âñòàâëÿåì íîâóþ ñòðàíèöó
246
    void newPage();//â ðàïîðò âñòàâëÿåì íîâóþ ñòðàíèöó
267
    void newPage();//â ðàïîðò âñòàâëÿåì íîâóþ ñòðàíèöó
247
268
248
    SpinBoxDelegate spinDelegate;
269
    SpinBoxDelegate spinDelegate;
249
    QItemDelegate standart_delegate;
270
    QItemDelegate standart_delegate;
250
    CPictureDelegate * picture_delegate;
271
    CPictureDelegate * picture_delegate;
251
    IconDelegate * iconDelegate;
272
    IconDelegate * iconDelegate;
252
    FileDelegate * fileDelegate; // äåëåãàò äëÿ òàáëèöû ñ ôèëüòðàìè, áóäåò îòîáðàæàòü ñïèñîê ïîëåé êëàññà
273
    FileDelegate * fileDelegate; // äåëåãàò äëÿ òàáëèöû ñ ôèëüòðàìè, áóäåò îòîáðàæàòü ñïèñîê ïîëåé êëàññà
253
    FilterSpinBoxDelegate filterSpinDelegate;
274
    FilterSpinBoxDelegate filterSpinDelegate;
254
    FilterConditionDelegate filterConditionDelegate, filterConditionDelegate_1, filterConditionDelegate_2;
275
    FilterConditionDelegate filterConditionDelegate, filterConditionDelegate_1, filterConditionDelegate_2;
255
    FilterValueDelegate filterValueDelegate; // äåëåãàò äëÿ òàáëèöû ñ ôèëüòðàìè, áóäåò îòîáðàæàòü ñïèñîê çíà÷åíèé îáúåêòîâ êëàññà
276
    FilterValueDelegate filterValueDelegate; // äåëåãàò äëÿ òàáëèöû ñ ôèëüòðàìè, áóäåò îòîáðàæàòü ñïèñîê çíà÷åíèé îáúåêòîâ êëàññà
256
277
257
    bool comboBox_slot_enable; // äëÿ áëîêèðîâêè ñëîòà, êîãäà ìåíÿåì item_index èç ïðîãðàììû, à íå âðó÷íóþ
278
    bool comboBox_slot_enable; // äëÿ áëîêèðîâêè ñëîòà, êîãäà ìåíÿåì item_index èç ïðîãðàììû, à íå âðó÷íóþ
258
    QList <int> boolFieldsIndexes_global; // ñïèñîê íîìåðîâ ñòîëáöîâ ñ òèïîì "BOOL"
279
    QList <int> boolFieldsIndexes_global; // ñïèñîê íîìåðîâ ñòîëáöîâ ñ òèïîì "BOOL"
259
280
260
    QMap <QString, QPixmap> classesIcons;
281
    QMap <QString, QPixmap> classesIcons;
261
282
262
    QTextDocument * doc;
283
    QTextDocument * doc;
263
    QTextCursor * cursor;
284
    QTextCursor * cursor;
264
285
265
286
266
287
267
private slots:
288
private slots:
268
    void on_comboBox_currentIndexChanged( int index );
289
    void on_comboBox_currentIndexChanged( int index );
269
    void on_treeWidget_itemChanged ( QTreeWidgetItem * item, int column );
290
    void on_treeWidget_itemChanged ( QTreeWidgetItem * item, int column );
270
    void on_treeWidget_itemClicked ( QTreeWidgetItem * item, int column );
291
    void on_treeWidget_itemClicked ( QTreeWidgetItem * item, int column );
271
    void on_treeWidget_2_itemClicked ( QTreeWidgetItem * item, int column );
292
    void on_treeWidget_2_itemClicked ( QTreeWidgetItem * item, int column );
272
    void on_pushButton_clicked(); // íàæàòèå êíîïêè "Äîáàâèòü îáúåêò"
293
    void on_pushButton_clicked(); // íàæàòèå êíîïêè "Äîáàâèòü îáúåêò"
273
    void on_pushButton_2_clicked();// íàæàòèå êíîïêè "Óäàëèòü âûäåëåííûå îáúåêòû"
294
    void on_pushButton_2_clicked();// íàæàòèå êíîïêè "Óäàëèòü âûäåëåííûå îáúåêòû"
274
    void on_pushButton_3_clicked();// íàæàòèå êíîïêè "Ïðèìåíèòü"
295
    void on_pushButton_3_clicked();// íàæàòèå êíîïêè "Ïðèìåíèòü"
275
    void on_pushButton_4_clicked();// íàæàòèå êíîïêè "Ñáðîñèòü èçìåíåíèÿ"
296
    void on_pushButton_4_clicked();// íàæàòèå êíîïêè "Ñáðîñèòü èçìåíåíèÿ"
276
    void on_pushButton_5_clicked();// íàæàòèå êíîïêè "Äîáàâèòü ìîäåëü "
297
    void on_pushButton_5_clicked();// íàæàòèå êíîïêè "Äîáàâèòü ìîäåëü "
277
    void on_pushButton_6_clicked();// íàæàòèå êíîïêè "Óäàëèòü ìîäåëü "
298
    void on_pushButton_6_clicked();// íàæàòèå êíîïêè "Óäàëèòü ìîäåëü "
278
    void on_pushButton_7_clicked();// íàæàòèå êíîïêè "Ïðèìåíèòü" (íà âêëàäêå ìîäåëåé)
299
    void on_pushButton_7_clicked();// íàæàòèå êíîïêè "Ïðèìåíèòü" (íà âêëàäêå ìîäåëåé)
279
    void on_pushButton_8_clicked();// íàæàòèå êíîïêè "Îòìåíèòü" (íà âêëàäêå ìîäåëåé)
300
    void on_pushButton_8_clicked();// íàæàòèå êíîïêè "Îòìåíèòü" (íà âêëàäêå ìîäåëåé)
280
    void on_pushButton_9_clicked();// íàæàòèå êíîïêè "Äîáàâèòü ôèëüòð" (íà âêëàäêå ôèëüòðîâ)
301
    void on_pushButton_9_clicked();// íàæàòèå êíîïêè "Äîáàâèòü ôèëüòð" (íà âêëàäêå ôèëüòðîâ)
281
    void on_pushButton_10_clicked();// íàæàòèå êíîïêè "Óäàëèòü ôèëüòð" (íà âêëàäêå ôèëüòðîâ)
302
    void on_pushButton_10_clicked();// íàæàòèå êíîïêè "Óäàëèòü ôèëüòð" (íà âêëàäêå ôèëüòðîâ)
282
    void on_pushButton_11_clicked();// íàæàòèå êíîïêè "Ïðèìåíèòü" (íà âêëàäêå ôèëüòðîâ)
303
    void on_pushButton_11_clicked();// íàæàòèå êíîïêè "Ïðèìåíèòü" (íà âêëàäêå ôèëüòðîâ)
283
    void on_pushButton_12_clicked();// íàæàòèå êíîïêè "Ñáðîñèòü èçìåíåíèÿ" (íà âêëàäêå ôèëüòðîâ)
304
    void on_pushButton_12_clicked();// íàæàòèå êíîïêè "Ñáðîñèòü èçìåíåíèÿ" (íà âêëàäêå ôèëüòðîâ)
284
    void on_pushButton_13_clicked();// íàæàòèå êíîïêè "Ñôîðìèðîâàòü êðàòêèé îò÷åò" (íà âêëàäêå îò÷åòîâ)
305
    void on_pushButton_13_clicked();// íàæàòèå êíîïêè "Ñôîðìèðîâàòü êðàòêèé îò÷åò" (íà âêëàäêå îò÷åòîâ)
285
    void on_pushButton_14_clicked();// íàæàòèå êíîïêè "Ñôîðìèðîâàòü ïîëíûé îò÷åò" (íà âêëàäêå îò÷åòîâ)
306
    void on_pushButton_14_clicked();// íàæàòèå êíîïêè "Ñôîðìèðîâàòü ïîëíûé îò÷åò" (íà âêëàäêå îò÷åòîâ)
286
    void on_pushButton_15_clicked();// íàæàòèå êíîïêè "Ïå÷àòü" (íà âêëàäêå îò÷åòîâ)
307
    void on_pushButton_15_clicked();// íàæàòèå êíîïêè "Ïå÷àòü" (íà âêëàäêå îò÷åòîâ)
287
    void on_pushButton_16_clicked();// íàæàòèå êíîïêè "Ïå÷àòü â PDF" (íà âêëàäêå îò÷åòîâ)
308
    void on_pushButton_16_clicked();// íàæàòèå êíîïêè "Ïå÷àòü â PDF" (íà âêëàäêå îò÷åòîâ)
288
    void on_pushButton_17_clicked();// íàæàòèå êíîïêè "Ýêñïîðò â OpenOffice" (íà âêëàäêå îò÷åòîâ)
309
    void on_pushButton_17_clicked();// íàæàòèå êíîïêè "Ýêñïîðò â OpenOffice" (íà âêëàäêå îò÷åòîâ)
289
    void on_pushButton_18_clicked();// íàæàòèå êíîïêè "Ýêñïîðò â OpenOffice" (íà âêëàäêå îò÷åòîâ)
310
    void on_pushButton_18_clicked();// íàæàòèå êíîïêè "Ýêñïîðò â OpenOffice" (íà âêëàäêå îò÷åòîâ)
290
311
291
312
292
    void on_sql_mogel_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
313
    void on_sql_mogel_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
293
    void on_model_for_ListModelsTable_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
314
    void on_model_for_ListModelsTable_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
294
    void on_filter_model_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); // èçìåíèëè ñâîéñòâà ôèëüòðà èëè äîáàâèëè íîâûé ôèëüòð
315
    void on_filter_model_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); // èçìåíèëè ñâîéñòâà ôèëüòðà èëè äîáàâèëè íîâûé ôèëüòð
295
    void applySetting();
316
    void applySetting();
296
    void getSetting(); // îòêðîåì îêíî íàñòðîåê
317
    void getSetting(); // îòêðîåì îêíî íàñòðîåê
297
    void readStandartProcessOutput();
318
    void readStandartProcessOutput();
298
    void readStandartProcessError();
319
    void readStandartProcessError();
299
320
300
321
301
322
302
323
303
};
324
};
304
325
305
326
306
327
307
328
308
#endif // MAINWINDOW_H
329
#endif // MAINWINDOW_H
309
 
330