Sat, 16 Mar 2013 17:50:13 +0200
So much for that pointer class, caused more problems than it solved. For instance splitting a second quad after a first one had been split would trigger a peculiar crash...
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; | |
13
3955ff2a7d72
Added logf function to write to message log. Write warnings of unparsable files into the message log.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
7
diff
changeset
|
24 | str zMessageLogHTML; |
0 | 25 | |
26 | // Menus | |
27 | QMenu* qFileMenu, *qEditMenu, *qInsertMenu, *qHelpMenu; | |
28 | ||
29 | // Toolbars | |
30 | QToolBar* qFileToolBar, *qEditToolBar, *qInsertToolBar; | |
31 | ||
32 | // ACTION ARMADA | |
33 | QAction* qAct_new, *qAct_open, *qAct_save, *qAct_saveAs, *qAct_exit; | |
34 | QAction* qAct_cut, *qAct_copy, *qAct_paste; | |
35 | QAction* qAct_newSubfile, *qAct_newLine, *qAct_newTriangle, *qAct_newQuad; | |
36 | QAction* qAct_newCondLine, *qAct_newComment, *qAct_newVector, *qAct_newVertex; | |
21
9aebaaafa5da
Added split-quads-to-triangles function
Santeri Piippo <crimsondusk64@gmail.com>
parents:
17
diff
changeset
|
37 | QAction* qAct_splitQuads, *qAct_setContents; |
0 | 38 | QAction* qAct_about, *qAct_aboutQt; |
39 | ||
40 | LDForgeWindow (); | |
41 | void buildObjList (); | |
7
098e3c4949c6
Set window title dynamically based on filename
Santeri Piippo <crimsondusk64@gmail.com>
parents:
0
diff
changeset
|
42 | void setTitle (); |
0 | 43 | |
17
5606eebd0b90
Allow addition of dummy lines..
Santeri Piippo <crimsondusk64@gmail.com>
parents:
14
diff
changeset
|
44 | // Where would a new item be inserted into? |
5606eebd0b90
Allow addition of dummy lines..
Santeri Piippo <crimsondusk64@gmail.com>
parents:
14
diff
changeset
|
45 | ulong getInsertionPoint (); |
5606eebd0b90
Allow addition of dummy lines..
Santeri Piippo <crimsondusk64@gmail.com>
parents:
14
diff
changeset
|
46 | |
0 | 47 | private: |
48 | void createMenuActions (); | |
49 | void createMenus (); | |
50 | void createToolbars (); | |
51 | ||
52 | private slots: | |
14
6d9d8efae2f8
this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
13
diff
changeset
|
53 | void slot_selectionChanged (); |
6d9d8efae2f8
this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
13
diff
changeset
|
54 | |
0 | 55 | void slot_new (); |
56 | void slot_open (); | |
57 | void slot_save (); | |
58 | void slot_saveAs (); | |
59 | void slot_exit (); | |
60 | ||
61 | void slot_newSubfile (); | |
62 | void slot_newLine (); | |
63 | void slot_newTriangle (); | |
64 | void slot_newQuad (); | |
65 | void slot_newCondLine (); | |
66 | void slot_newComment (); | |
67 | void slot_newVector (); | |
68 | void slot_newVertex (); | |
69 | ||
21
9aebaaafa5da
Added split-quads-to-triangles function
Santeri Piippo <crimsondusk64@gmail.com>
parents:
17
diff
changeset
|
70 | void slot_splitQuads (); |
14
6d9d8efae2f8
this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
13
diff
changeset
|
71 | void slot_setContents (); |
6d9d8efae2f8
this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
13
diff
changeset
|
72 | |
0 | 73 | void slot_cut (); |
74 | void slot_copy (); | |
75 | void slot_paste (); | |
76 | ||
77 | void slot_about (); | |
78 | void slot_aboutQt (); | |
79 | }; | |
80 | ||
81 | enum { | |
82 | LDOLC_Icon, | |
83 | LDOLC_Data, | |
84 | NUM_LDOL_Columns | |
85 | }; | |
86 | ||
87 | #endif |