Fri, 15 Mar 2013 20:11:18 +0200
Initial commit
0 | 1 | #ifndef __GUI_H__ |
2 | #define __GUI_H__ | |
3 | ||
4 | #include <QMainWindow> | |
5 | #include <QMenu> | |
6 | #include <QToolBar> | |
7 | #include <QAction> | |
8 | #include <QTreeWidget> | |
9 | #include <QToolBar> | |
10 | #include <QTextEdit> | |
11 | #include "draw.h" | |
12 | ||
13 | class LDForgeWindow : public QMainWindow { | |
14 | Q_OBJECT | |
15 | ||
16 | public: | |
17 | renderer* R; | |
18 | ||
19 | // Object list view | |
20 | QTreeWidget* qObjList; | |
21 | ||
22 | // Message log | |
23 | QTextEdit* qMessageLog; | |
24 | ||
25 | // Menus | |
26 | QMenu* qFileMenu, *qEditMenu, *qInsertMenu, *qHelpMenu; | |
27 | ||
28 | // Toolbars | |
29 | QToolBar* qFileToolBar, *qEditToolBar, *qInsertToolBar; | |
30 | ||
31 | // ACTION ARMADA | |
32 | QAction* qAct_new, *qAct_open, *qAct_save, *qAct_saveAs, *qAct_exit; | |
33 | QAction* qAct_cut, *qAct_copy, *qAct_paste; | |
34 | QAction* qAct_newSubfile, *qAct_newLine, *qAct_newTriangle, *qAct_newQuad; | |
35 | QAction* qAct_newCondLine, *qAct_newComment, *qAct_newVector, *qAct_newVertex; | |
36 | QAction* qAct_about, *qAct_aboutQt; | |
37 | ||
38 | LDForgeWindow (); | |
39 | void buildObjList (); | |
40 | ||
41 | private: | |
42 | void createMenuActions (); | |
43 | void createMenus (); | |
44 | void createToolbars (); | |
45 | ||
46 | private slots: | |
47 | void slot_new (); | |
48 | void slot_open (); | |
49 | void slot_save (); | |
50 | void slot_saveAs (); | |
51 | void slot_exit (); | |
52 | ||
53 | void slot_newSubfile (); | |
54 | void slot_newLine (); | |
55 | void slot_newTriangle (); | |
56 | void slot_newQuad (); | |
57 | void slot_newCondLine (); | |
58 | void slot_newComment (); | |
59 | void slot_newVector (); | |
60 | void slot_newVertex (); | |
61 | ||
62 | void slot_cut (); | |
63 | void slot_copy (); | |
64 | void slot_paste (); | |
65 | ||
66 | void slot_about (); | |
67 | void slot_aboutQt (); | |
68 | }; | |
69 | ||
70 | enum { | |
71 | LDOLC_Icon, | |
72 | LDOLC_Data, | |
73 | NUM_LDOL_Columns | |
74 | }; | |
75 | ||
76 | #endif |