Replace and remove old methods with newly named ones integrated with layout generated...
[vlp.git] / src / edit / editor.h
1 #ifndef QWERTY_H
2 #define QWERTY_H
3
4 #include <QtGui/QTextEdit>
5 #include <QtGui/QMainWindow>
6 #include <QtGui/QLineEdit>
7 #include <QtGui/QPushButton>
8 #include <QtGui/QLabel>
9
10 #include "ui/editor.h"
11
12 #define COMP_MODE       1
13 #define GEN_MODE        2
14 #define ALL_MODE        3
15
16 typedef struct {
17         char name[255];
18         char filename[255];
19 } FuncEntry;
20
21 typedef struct {
22         QList<FuncEntry> dictionary;
23         QStringList names;
24         char name[255];
25 } CategoryEntry;
26
27 class Editor : public QMainWindow, private Ui::EditorWindow {
28         Q_OBJECT
29 public:
30         QString compiler_path;
31         QString gen_path;
32         QString file_path;
33
34         Editor(int argc, char **argv);
35         ~Editor();
36
37         void compile(int mode);
38
39 public:
40         void load(const char *fileName);
41         void save(const char *fileName);
42         void props();
43         void print();
44
45         void log_unit();
46         void log_prog();
47 private:
48         QString fname;
49         QString find_text;
50         bool sensitive;
51         char HomeDir[255];
52
53 private slots:
54         void on_actionNew_triggered();
55         void on_actionOpen_triggered();
56         void on_actionSave_triggered();
57         void on_actionSave_as_triggered();
58         void on_actionQuit_triggered();
59         void on_actionCopy_triggered();
60         void on_actionPaste_triggered();
61         void on_actionCut_triggered();
62         void on_actionClear_all_triggered();
63         void on_actionFind_triggered();
64         void on_actionFind_Next_triggered();
65         void on_actionPreferences_triggered();
66
67         void on_actionCompile_triggered();
68         void on_actionGen_triggered();
69         void on_actionCompile_Gen_triggered();
70
71         void on_actionProgram_structure_triggered();
72         void on_actionUnit_structure_triggered();
73
74
75         void on_editor_cursorPositionChanged();
76 };
77
78 #endif // QWERTY_H