Subversion Repositories OpenInventory

Rev

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

Rev Author Line No. Line
25 pingvin 1
#ifndef CLASSEDITOR_H
2
#define CLASSEDITOR_H
3
 
4
#include <QMainWindow>
5
#include "mysql.h"
50 pingvin 6
#include "mymodel.h"
61 pingvin 7
#include "modelfordescriptiontable.h"
65 pingvin 8
#include "delegateforclassestable.h"
82 pingvin 9
#include "modelforpointers.h"
25 pingvin 10
 
45 pingvin 11
#include <QTreeView>
38 pingvin 12
 
45 pingvin 13
 
25 pingvin 14
namespace Ui {
15
    class ClassEditor;
16
}
17
 
18
class ClassEditor : public QMainWindow {
19
    Q_OBJECT
20
public:
21
    ClassEditor(QWidget *parent = 0);
22
    ~ClassEditor();
23
 
24
protected:
25
    void changeEvent(QEvent *e);
26
 
27
private:
28
    Ui::ClassEditor *ui;
29
    MySql sql;
30
    SettingsDialog settdialog;
33 pingvin 31
    TableField *field;
38 pingvin 32
    SqlTable *table;
62 pingvin 33
    QModelIndex currIndexOfClassesTable; //      
34
    QString currClassID; //   
72 pingvin 35
    QString currInctanceTable; //  -    
45 pingvin 36
 
56 pingvin 37
    QSqlTableModel* model;
82 pingvin 38
 
39
 
40
   // QSqlTableModel* modelForPointers; //     
41
    ModelForPointers* modelForPointers; //     
42
 
43
    // QSqlTableModel* modelForDescription;
61 pingvin 44
    ModelForDescriptionTable* modelForDescription;
45
 
72 pingvin 46
    QSqlTableModel* Inctance_model;
47
 
56 pingvin 48
    QTableView* tableForDescription;
50 pingvin 49
    MyModel* mymodel;
51 pingvin 50
 
72 pingvin 51
    QTableView* tableForInstance; //    -  
52
    QTableView tableForInstance_new; //    -  
71 pingvin 53
 
65 pingvin 54
    DelegateForClassesTable classTableDelegate;
55
 
71 pingvin 56
  //  void addNewClass(); //   
54 pingvin 57
    void addNewClass_new();
62 pingvin 58
    void addNewField(); //     
86 pingvin 59
    void addNewPointer();//  ,       -
76 pingvin 60
    void refreshInctance(); //   -
51 pingvin 61
 
62
private slots:
63
 
59 pingvin 64
    void on_pushButton_clicked();           //    " "
65
    void on_pushButton_2_clicked();         //    " "
66
    void on_pushButton_3_clicked();         //    " "
67
    void on_pushButton_4_clicked();         //    " "
63 pingvin 68
    void on_pushButton_5_clicked();         //    "  "
65 pingvin 69
    void on_action_ID_triggered(bool is_checked);          //     " ID"
70
    void on_action_showAlias_triggered(bool is_checked);     //     " "
71
    void on_action_showInstance_triggered(bool is_checked); // ...   
87 pingvin 72
 
55 pingvin 73
    void on_tableView_clicked(const QModelIndex & index );
62 pingvin 74
    void on_myModel_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight );
75
    void on_modelForDescription_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight );
68 pingvin 76
    void on_action_removeAllClasses(); //   
87 pingvin 77
    void on_action_removeSelectedPointers(); //   
78
 
68 pingvin 79
    void removeClass(int class_row); //   ,      class_row
77 pingvin 80
    void on_field_changed(); //   
86 pingvin 81
    void on_action_newPointer(); //     -
82
 
25 pingvin 83
};
84
 
85
#endif // CLASSEDITOR_H