Subversion Repositories OpenInventory

Rev

Rev 130 | Rev 138 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 130 Rev 132
Line 3... Line 3...
3
3
4
4
5
//#include "mysql.h"
5
//#include "mysql.h"
6
6
7
#include "mymodel.h"
7
#include "mymodel.h"
8
-
 
-
 
8
#include "settingform.h"
9
#include "delegate.h"
9
#include "delegate.h"
10
10
11
#include <QMainWindow>
11
#include <QMainWindow>
12
#include <QStandardItemModel>
12
#include <QStandardItemModel>
13
#include <QStandardItem>
13
#include <QStandardItem>
Line 59... Line 59...
59
    void changeEvent(QEvent *e);
59
    void changeEvent(QEvent *e);
60
60
61
private:
61
private:
62
    Ui::MainWindow *ui;
62
    Ui::MainWindow *ui;
63
63
-
 
64
        settingForm setFrm;
-
 
65
//ïåðåìåííûå äëÿ ñîåäèíåíèÿ ñ áàçîé
-
 
66
        QString baseName;
-
 
67
        QString hostName;
-
 
68
        QString userName;
-
 
69
        QString password;
-
 
70
        QString tableName;
-
 
71
-
 
72
        void readSettings();
-
 
73
        void writeSettings();
-
 
74
-
 
75
-
 
76
64
    QList<QTreeWidgetItem *> root_items_list;
77
    QList<QTreeWidgetItem *> root_items_list;
65
    QStandardItemModel *model;
78
    QStandardItemModel *model;
66
    QStandardItem *item;
79
    QStandardItem *item;
67
    QTreeWidgetItem *rootItem1, *rootItem2;
80
    QTreeWidgetItem *rootItem1, *rootItem2;
68
    void openBase();
81
    void openBase();
Line 108... Line 121...
108
    QMap <QString, QString> getPointersList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé-óêàçàòåëåé, â êà÷åñòâå êëþ÷åé ïîëó÷èì èìåíà ïîëåé-óêàçàòåëåé
121
    QMap <QString, QString> getPointersList(QString class_id); // ïîëó÷àåì ñïèñîê âñåõ ïîëåé-óêàçàòåëåé, â êà÷åñòâå êëþ÷åé ïîëó÷èì èìåíà ïîëåé-óêàçàòåëåé
109
                                                                // â êà÷åñòâå çíà÷åíèé ïîëó÷èì ñïèñîê òàáëèö-õðàíèëèù îáúåêòîâ ðîäèòåëüñêèõ êëàññîâ
122
                                                                // â êà÷åñòâå çíà÷åíèé ïîëó÷èì ñïèñîê òàáëèö-õðàíèëèù îáúåêòîâ ðîäèòåëüñêèõ êëàññîâ
110
    SpinBoxDelegate spinDelegate;
123
    SpinBoxDelegate spinDelegate;
111
    QItemDelegate standart_delegate;
124
    QItemDelegate standart_delegate;
112
125
-
 
126
-
 
127
-
 
128
-
 
129
-
 
130
-
 
131
-
 
132
113
private slots:
133
private slots:
114
    void on_comboBox_currentIndexChanged( int index );
134
    void on_comboBox_currentIndexChanged( int index );
115
    void on_treeWidget_itemChanged ( QTreeWidgetItem * item, int column );
135
    void on_treeWidget_itemChanged ( QTreeWidgetItem * item, int column );
116
    void on_treeWidget_itemClicked ( QTreeWidgetItem * item, int column );
136
    void on_treeWidget_itemClicked ( QTreeWidgetItem * item, int column );
117
    void on_treeWidget_2_itemClicked ( QTreeWidgetItem * item, int column );
137
    void on_treeWidget_2_itemClicked ( QTreeWidgetItem * item, int column );
118
    void on_pushButton_clicked(); // íàæàòèå êíîïêè "Äîáàâèòü îáúåêò"
138
    void on_pushButton_clicked(); // íàæàòèå êíîïêè "Äîáàâèòü îáúåêò"
119
    void on_pushButton_2_clicked();// íàæàòèå êíîïêè "Óäàëèòü âûäåëåííûå îáúåêòû"
139
    void on_pushButton_2_clicked();// íàæàòèå êíîïêè "Óäàëèòü âûäåëåííûå îáúåêòû"
120
    void on_pushButton_3_clicked();// íàæàòèå êíîïêè "Ïðèìåíèòü"
140
    void on_pushButton_3_clicked();// íàæàòèå êíîïêè "Ïðèìåíèòü"
121
    void on_pushButton_4_clicked();// íàæàòèå êíîïêè "Ñáðîñèòü èçìåíåíèÿ"
141
    void on_pushButton_4_clicked();// íàæàòèå êíîïêè "Ñáðîñèòü èçìåíåíèÿ"
122
    void on_sql_mogel_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
142
    void on_sql_mogel_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ); // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
123
-
 
-
 
143
    void applySetting();
-
 
144
    void getSetting(); // îòêðîåì îêíî íàñòðîåê
124
};
145
};
125
146
126
147
127
148
128
149