Implement missing functions
[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 private:
43         QString fname;
44         QString find_text;
45         bool sensitive;
46         char HomeDir[255];
47
48 private slots:
49         void on_actionNew_triggered();
50         void on_actionOpen_triggered();
51         void on_actionSave_triggered();
52         void on_actionSave_as_triggered();
53         void on_actionQuit_triggered();
54         void on_actionCopy_triggered();
55         void on_actionPaste_triggered();
56         void on_actionCut_triggered();
57         void on_actionClear_all_triggered();
58         void on_actionFind_triggered();
59         void on_actionFind_Next_triggered();
60         void on_actionPreferences_triggered();
61
62         void on_actionCompile_triggered();
63         void on_actionGen_triggered();
64         void on_actionCompile_Gen_triggered();
65
66         void on_actionProgram_structure_triggered();
67         void on_actionUnit_structure_triggered();
68
69
70         void on_editor_cursorPositionChanged();
71 };
72
73 #endif // QWERTY_H