Subversion Repositories OpenInventory

Rev

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

Rev 89 Rev 91
1
#ifndef MAINWINDOW_H
1
#ifndef MAINWINDOW_H
2
#define MAINWINDOW_H
2
#define MAINWINDOW_H
3
3
4
#include <QMainWindow>
4
#include <QMainWindow>
5
#include <QStandardItemModel>
5
#include <QStandardItemModel>
6
#include <QStandardItem>
6
#include <QStandardItem>
7
#include <QTreeWidgetItem>
7
#include <QTreeWidgetItem>
8
#include <QTextCodec>
8
#include <QTextCodec>
9
#include <QSqlDatabase>
9
#include <QSqlDatabase>
10
10
11
#include <QtGui>
11
#include <QtGui>
12
12
13
namespace Ui {
13
namespace Ui {
14
    class MainWindow;
14
    class MainWindow;
15
}
15
}
16
16
17
class MainWindow : public QMainWindow {
17
class MainWindow : public QMainWindow {
18
    Q_OBJECT
18
    Q_OBJECT
19
public:
19
public:
20
    MainWindow(QWidget *parent = 0);
20
    MainWindow(QWidget *parent = 0);
21
    ~MainWindow();
21
    ~MainWindow();
22
22
23
protected:
23
protected:
24
    void changeEvent(QEvent *e);
24
    void changeEvent(QEvent *e);
25
25
26
private:
26
private:
27
    Ui::MainWindow *ui;
27
    Ui::MainWindow *ui;
28
28
29
    QStandardItemModel *model;
29
    QStandardItemModel *model;
30
    QStandardItem *item;
30
    QStandardItem *item;
31
    QTreeWidgetItem *rootItem1, *rootItem2;
31
    QTreeWidgetItem *rootItem1, *rootItem2;
32
    void openBase();
32
    void openBase();
33
    bool readModel();
33
    bool readModel();
34
    void setupModelData(const QStringList &lines, QTreeWidgetItem *parent);
34
    void setupModelData(const QStringList &lines, QTreeWidgetItem *parent);
35
-
 
-
 
35
    void creatModelString();
-
 
36
    QString modelString; // ñòðîêà, îïèñûâàþùàÿ ìîäåëü ïðåäñòàâëåíèÿ
-
 
37
    void addChildsString(QTreeWidgetItem *parentItem, int level);
36
};
38
};
37
39
38
#endif // MAINWINDOW_H
40
#endif // MAINWINDOW_H
39
 
41