Mon, 18 Mar 2013 18:29:02 +0200
Added LDraw path setting dialog
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> | |
26
83184d9407c7
Renamed io.cpp to file.cpp, draw.cpp to gldraw.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents:
25
diff
changeset
|
11 | #include "gldraw.h" |
0 | 12 | |
25
c74bb88f537d
Deleted scanner.cpp (don't need it), merged model.cpp into io.cpp. Renamed LDForgeWindow to just ForgeWindow since I want the LD* prefix only be given to LDObject derivatives.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
24
diff
changeset
|
13 | class ForgeWindow : public QMainWindow { |
0 | 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; | |
24
d2d4d0154338
added dummy action for future inlining command. Also GCC says that deleting instances of classes with virtual members but no virtual destructors is bad.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
21
diff
changeset
|
37 | QAction* qAct_splitQuads, *qAct_setContents, *qAct_inline; |
29
55406ce7446e
Added LDraw path setting dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents:
26
diff
changeset
|
38 | QAction* qAct_settings; |
0 | 39 | QAction* qAct_about, *qAct_aboutQt; |
40 | ||
25
c74bb88f537d
Deleted scanner.cpp (don't need it), merged model.cpp into io.cpp. Renamed LDForgeWindow to just ForgeWindow since I want the LD* prefix only be given to LDObject derivatives.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
24
diff
changeset
|
41 | ForgeWindow (); |
0 | 42 | void buildObjList (); |
7
098e3c4949c6
Set window title dynamically based on filename
Santeri Piippo <crimsondusk64@gmail.com>
parents:
0
diff
changeset
|
43 | void setTitle (); |
29
55406ce7446e
Added LDraw path setting dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents:
26
diff
changeset
|
44 | void refresh (); |
0 | 45 | |
17
5606eebd0b90
Allow addition of dummy lines..
Santeri Piippo <crimsondusk64@gmail.com>
parents:
14
diff
changeset
|
46 | // Where would a new item be inserted into? |
5606eebd0b90
Allow addition of dummy lines..
Santeri Piippo <crimsondusk64@gmail.com>
parents:
14
diff
changeset
|
47 | ulong getInsertionPoint (); |
5606eebd0b90
Allow addition of dummy lines..
Santeri Piippo <crimsondusk64@gmail.com>
parents:
14
diff
changeset
|
48 | |
0 | 49 | private: |
50 | void createMenuActions (); | |
51 | void createMenus (); | |
52 | void createToolbars (); | |
53 | ||
54 | 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
|
55 | 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
|
56 | |
0 | 57 | void slot_new (); |
58 | void slot_open (); | |
59 | void slot_save (); | |
60 | void slot_saveAs (); | |
61 | void slot_exit (); | |
62 | ||
63 | void slot_newSubfile (); | |
64 | void slot_newLine (); | |
65 | void slot_newTriangle (); | |
66 | void slot_newQuad (); | |
67 | void slot_newCondLine (); | |
68 | void slot_newComment (); | |
69 | void slot_newVector (); | |
70 | void slot_newVertex (); | |
71 | ||
24
d2d4d0154338
added dummy action for future inlining command. Also GCC says that deleting instances of classes with virtual members but no virtual destructors is bad.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
21
diff
changeset
|
72 | void slot_inline (); |
21
9aebaaafa5da
Added split-quads-to-triangles function
Santeri Piippo <crimsondusk64@gmail.com>
parents:
17
diff
changeset
|
73 | 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
|
74 | 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
|
75 | |
0 | 76 | void slot_cut (); |
77 | void slot_copy (); | |
78 | void slot_paste (); | |
79 | ||
29
55406ce7446e
Added LDraw path setting dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents:
26
diff
changeset
|
80 | void slot_settings (); |
55406ce7446e
Added LDraw path setting dialog
Santeri Piippo <crimsondusk64@gmail.com>
parents:
26
diff
changeset
|
81 | |
0 | 82 | void slot_about (); |
83 | void slot_aboutQt (); | |
84 | }; | |
85 | ||
86 | enum { | |
87 | LDOLC_Icon, | |
88 | LDOLC_Data, | |
89 | NUM_LDOL_Columns | |
90 | }; | |
91 | ||
92 | #endif |