Subversion Repositories OpenInventory

Rev

Rev 95 | Rev 98 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
88 pingvin 1
#ifndef MAINWINDOW_H
2
#define MAINWINDOW_H
3
 
93 pingvin 4
 
5
//#include "mysql.h"
88 pingvin 6
#include <QMainWindow>
7
#include <QStandardItemModel>
8
#include <QStandardItem>
9
#include <QTreeWidgetItem>
10
#include <QTextCodec>
89 pingvin 11
#include <QSqlDatabase>
88 pingvin 12
 
89 pingvin 13
#include <QtGui>
93 pingvin 14
#include <QString>
15
#include <QtSql>
89 pingvin 16
 
93 pingvin 17
 
18
/*
19
#include <QSqlField>
20
#include <QSqlRecord>
21
#include <QSqlTableModel>
22
#include <QSqlQueryModel>
23
#include <QTableView>
24
#include <QSqlDriverPlugin>
25
#include <QIcon>
26
#include <QVariant>
27
#include <QProcess>
28
#include <QByteArray>
29
*/
30
 
31
 
32
 
33
 
34
 
35
 
88 pingvin 36
namespace Ui {
37
    class MainWindow;
38
}
39
 
40
class MainWindow : public QMainWindow {
41
    Q_OBJECT
42
public:
43
    MainWindow(QWidget *parent = 0);
44
    ~MainWindow();
45
 
46
protected:
47
    void changeEvent(QEvent *e);
48
 
49
private:
50
    Ui::MainWindow *ui;
51
 
52
    QStandardItemModel *model;
53
    QStandardItem *item;
54
    QTreeWidgetItem *rootItem1, *rootItem2;
89 pingvin 55
    void openBase();
56
    bool readModel();
57
    void setupModelData(const QStringList &lines, QTreeWidgetItem *parent);
91 pingvin 58
    void creatModelString();
59
    QString modelString; // ,   
60
    void addChildsString(QTreeWidgetItem *parentItem, int level);
93 pingvin 61
 
62
    QSqlDatabase sql;
63
 
64
    bool openDataBase();
97 pingvin 65
    bool buildPreviewModel(QString modelName, QString rootClassID);
95 pingvin 66
    QString ClassName(QString class_id); //     ID
93 pingvin 67
 
68
 
95 pingvin 69
 
88 pingvin 70
};
71
 
72
#endif // MAINWINDOW_H