Mon, 23 Dec 2013 10:57:54 +0200
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
1 | /* |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
2 | * LDForge: LDraw parts authoring CAD |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
3 | * Copyright (C) 2013 Santeri Piippo |
455
c5d14d112034
Code formatting: use same separators everywhere, remove extra spaces from license headers, simplified message manager api a bit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
409
diff
changeset
|
4 | * |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
5 | * This program is free software: you can redistribute it and/or modify |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
6 | * it under the terms of the GNU General Public License as published by |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
7 | * the Free Software Foundation, either version 3 of the License, or |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
8 | * (at your option) any later version. |
455
c5d14d112034
Code formatting: use same separators everywhere, remove extra spaces from license headers, simplified message manager api a bit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
409
diff
changeset
|
9 | * |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
10 | * This program is distributed in the hope that it will be useful, |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
13 | * GNU General Public License for more details. |
455
c5d14d112034
Code formatting: use same separators everywhere, remove extra spaces from license headers, simplified message manager api a bit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
409
diff
changeset
|
14 | * |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
15 | * You should have received a copy of the GNU General Public License |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
17 | */ |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
18 | |
538
2f85d4d286e5
- ensured header files' guards start with LDFORGE_
Santeri Piippo <crimsondusk64@gmail.com>
parents:
534
diff
changeset
|
19 | #ifndef LDFORGE_GUI_H |
2f85d4d286e5
- ensured header files' guards start with LDFORGE_
Santeri Piippo <crimsondusk64@gmail.com>
parents:
534
diff
changeset
|
20 | #define LDFORGE_GUI_H |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
21 | |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
22 | #include <QMainWindow> |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
23 | #include <QAction> |
198
f246725199dc
Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
194
diff
changeset
|
24 | #include <QListWidget> |
335
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
25 | #include <QRadioButton> |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
26 | #include "config.h" |
198
f246725199dc
Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
194
diff
changeset
|
27 | #include "ldtypes.h" |
587
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
28 | #include "ui_ldforge.h" |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
29 | |
322
5e701c3c3d8e
Re-added the message log, now draws into the viewport
Santeri Piippo <crimsondusk64@gmail.com>
parents:
310
diff
changeset
|
30 | class MessageManager; |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
31 | class ForgeWindow; |
364
7c3af0a6f8ab
Renamed the color class to LDColor for clarity
Santeri Piippo <crimsondusk64@gmail.com>
parents:
360
diff
changeset
|
32 | class LDColor; |
186
a130960bb220
Make quick color toolbar use QToolButtons, make color selector's process of making color icons a method and use that for generic color icons
Santeri Piippo <crimsondusk64@gmail.com>
parents:
183
diff
changeset
|
33 | class QToolButton; |
190
82f784cf2ce5
Added tool for replacing coordinate values
Santeri Piippo <crimsondusk64@gmail.com>
parents:
189
diff
changeset
|
34 | class QDialogButtonBox; |
198
f246725199dc
Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
194
diff
changeset
|
35 | class GLRenderer; |
290
be0c367e7420
Added primitive scanning, replaced parts list in subfile add dialog with it
Santeri Piippo <crimsondusk64@gmail.com>
parents:
286
diff
changeset
|
36 | class QComboBox; |
be0c367e7420
Added primitive scanning, replaced parts list in subfile add dialog with it
Santeri Piippo <crimsondusk64@gmail.com>
parents:
286
diff
changeset
|
37 | class QProgressBar; |
382
c1642530ea35
Converted ForgeWindow to Designer UI(!)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
364
diff
changeset
|
38 | class Ui_LDForgeUI; |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
39 | |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
40 | // Stuff for dialogs |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
41 | #define IMPLEMENT_DIALOG_BUTTONS \ |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
42 | bbx_buttons = new QDialogButtonBox (QDialogButtonBox::Ok | QDialogButtonBox::Cancel); \ |
383
10e60ae9ed58
File list is populated now..
Santeri Piippo <crimsondusk64@gmail.com>
parents:
382
diff
changeset
|
43 | connect (bbx_buttons, SIGNAL (accepted()), this, SLOT (accept())); \ |
10e60ae9ed58
File list is populated now..
Santeri Piippo <crimsondusk64@gmail.com>
parents:
382
diff
changeset
|
44 | connect (bbx_buttons, SIGNAL (rejected()), this, SLOT (reject())); \ |
587
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
45 | |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
46 | // ============================================================================= |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
47 | // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
48 | // ============================================================================= |
382
c1642530ea35
Converted ForgeWindow to Designer UI(!)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
364
diff
changeset
|
49 | #define DEFINE_ACTION(NAME, DEFSHORTCUT) \ |
587
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
50 | cfg (KeySequence, key_action##NAME, DEFSHORTCUT); \ |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
51 | void ForgeWindow::slot_action##NAME() |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
52 | |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
53 | // Convenience macros for key sequences. |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
54 | #define KEY(N) (Qt::Key_##N) |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
55 | #define CTRL(N) (Qt::CTRL | Qt::Key_##N) |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
56 | #define SHIFT(N) (Qt::SHIFT | Qt::Key_##N) |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
57 | #define CTRL_SHIFT(N) (Qt::CTRL | Qt::SHIFT | Qt::Key_##N) |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
58 | |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
59 | // ============================================================================= |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
60 | class LDQuickColor |
540
0334789cb4d7
- Changed the callback parm of PROPERTY to a stock/custom write method argument.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
539
diff
changeset
|
61 | { PROPERTY (public, LDColor*, Color, NO_OPS, STOCK_WRITE) |
0334789cb4d7
- Changed the callback parm of PROPERTY to a stock/custom write method argument.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
539
diff
changeset
|
62 | PROPERTY (public, QToolButton*, ToolButton, NO_OPS, STOCK_WRITE) |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
63 | |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
64 | public: |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
65 | LDQuickColor (LDColor* color, QToolButton* toolButton); |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
66 | bool isSeparator() const; |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
67 | |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
68 | static LDQuickColor getSeparator(); |
395
5210bcb1d7e0
Further restructure, removed GUI toolbar icon size slider (always 22x22 now)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
388
diff
changeset
|
69 | }; |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
70 | |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
71 | // ============================================================================= |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
72 | // ObjectList |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
73 | // |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
74 | // Object list class for ForgeWindow |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
75 | // ============================================================================= |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
76 | class ObjectList : public QListWidget |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
77 | { Q_OBJECT |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
78 | |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
79 | protected: |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
80 | void contextMenuEvent (QContextMenuEvent* ev); |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
81 | }; |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
82 | |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
83 | // ============================================================================= |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
84 | // ForgeWindow |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
85 | // |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
86 | // The one main GUI class. Hosts the renderer, object list, message log. Contains |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
87 | // slot_action, which is what all actions connect to. Manages menus and toolbars. |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
88 | // Large and in charge. |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
89 | // ============================================================================= |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
90 | class ForgeWindow : public QMainWindow |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
91 | { Q_OBJECT |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
92 | |
587
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
93 | typedefs: |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
94 | using ActionMethodType = void (ForgeWindow::*)(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
95 | |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
96 | public: |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
97 | ForgeWindow(); |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
98 | void buildObjList(); |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
99 | void updateTitle(); |
538
2f85d4d286e5
- ensured header files' guards start with LDFORGE_
Santeri Piippo <crimsondusk64@gmail.com>
parents:
534
diff
changeset
|
100 | void doFullRefresh(); |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
101 | void refresh(); |
498
791c831c8020
further cleansing - removed most uses of unsigned ints, removed list reversers
Santeri Piippo <crimsondusk64@gmail.com>
parents:
493
diff
changeset
|
102 | int getInsertionPoint(); |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
103 | void updateToolBars(); |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
104 | void updateRecentFilesMenu(); |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
105 | void updateSelection(); |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
106 | void updateGridToolBar(); |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
107 | void updateEditModeActions(); |
553
2418d5955421
- LDFile renamed to LDDocument, file.h -> document.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
542
diff
changeset
|
108 | void updateDocumentList(); |
2418d5955421
- LDFile renamed to LDDocument, file.h -> document.h
Santeri Piippo <crimsondusk64@gmail.com>
parents:
542
diff
changeset
|
109 | void updateDocumentListItem (LDDocument* f); |
538
2f85d4d286e5
- ensured header files' guards start with LDFORGE_
Santeri Piippo <crimsondusk64@gmail.com>
parents:
534
diff
changeset
|
110 | int getSelectedColor(); |
2f85d4d286e5
- ensured header files' guards start with LDFORGE_
Santeri Piippo <crimsondusk64@gmail.com>
parents:
534
diff
changeset
|
111 | LDObject::Type getUniformSelectedType(); |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
112 | void scrollToSelection(); |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
113 | void spawnContextMenu (const QPoint pos); |
538
2f85d4d286e5
- ensured header files' guards start with LDFORGE_
Santeri Piippo <crimsondusk64@gmail.com>
parents:
534
diff
changeset
|
114 | void deleteObjects (QList<LDObject*> objs); |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
115 | int deleteSelection(); |
538
2f85d4d286e5
- ensured header files' guards start with LDFORGE_
Santeri Piippo <crimsondusk64@gmail.com>
parents:
534
diff
changeset
|
116 | void deleteByColor (const int colnum); |
575
59c0b57e843b
- added selection auto-subfiling(!)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
554
diff
changeset
|
117 | bool save (LDDocument* f, bool saveAs); |
542
46a33bdc0b36
- Improved coordinate rounding, replaced the hack with a proper implementation, now rounds properly and works on subfiles as well
Santeri Piippo <crimsondusk64@gmail.com>
parents:
540
diff
changeset
|
118 | void updateActions(); |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
119 | |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
120 | inline GLRenderer* R() |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
121 | { return m_renderer; |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
122 | } |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
123 | |
504
6a1fa662bfc1
Removed the List -> QList alias, use QList directly
Santeri Piippo <crimsondusk64@gmail.com>
parents:
498
diff
changeset
|
124 | inline void setQuickColors (QList<LDQuickColor>& colors) |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
125 | { m_quickColors = colors; |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
126 | } |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
127 | |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
128 | void setStatusBarText (str text); |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
129 | void addMessage (str msg); |
587
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
130 | Ui_LDForgeUI* getInterface() const; |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
131 | void refreshObjectList(); |
587
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
132 | void updateActionShortcuts(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
133 | KeySequenceConfig& shortcutForAction (QAction* act); |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
134 | void endAction(); |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
135 | |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
136 | public slots: |
554
2478a6b3106d
- Reworked primitive listing. No longer uses multi-threading.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
553
diff
changeset
|
137 | #if 0 |
498
791c831c8020
further cleansing - removed most uses of unsigned ints, removed list reversers
Santeri Piippo <crimsondusk64@gmail.com>
parents:
493
diff
changeset
|
138 | void primitiveLoaderStart (int max); |
791c831c8020
further cleansing - removed most uses of unsigned ints, removed list reversers
Santeri Piippo <crimsondusk64@gmail.com>
parents:
493
diff
changeset
|
139 | void primitiveLoaderUpdate (int prog); |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
140 | void primitiveLoaderEnd(); |
554
2478a6b3106d
- Reworked primitive listing. No longer uses multi-threading.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
553
diff
changeset
|
141 | #endif // 0 |
587
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
142 | void changeCurrentFile(); |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
143 | void slot_action(); |
587
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
144 | void slot_actionNew(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
145 | void slot_actionNewFile(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
146 | void slot_actionOpen(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
147 | void slot_actionDownloadFrom(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
148 | void slot_actionSave(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
149 | void slot_actionSaveAs(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
150 | void slot_actionSaveAll(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
151 | void slot_actionClose(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
152 | void slot_actionCloseAll(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
153 | void slot_actionInsertFrom(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
154 | void slot_actionExportTo(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
155 | void slot_actionSettings(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
156 | void slot_actionSetLDrawPath(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
157 | void slot_actionScanPrimitives(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
158 | void slot_actionExit(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
159 | void slot_actionResetView(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
160 | void slot_actionAxes(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
161 | void slot_actionWireframe(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
162 | void slot_actionBFCView(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
163 | void slot_actionSetOverlay(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
164 | void slot_actionClearOverlay(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
165 | void slot_actionScreenshot(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
166 | void slot_actionInsertRaw(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
167 | void slot_actionNewSubfile(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
168 | void slot_actionNewLine(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
169 | void slot_actionNewTriangle(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
170 | void slot_actionNewQuad(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
171 | void slot_actionNewCLine(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
172 | void slot_actionNewComment(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
173 | void slot_actionNewBFC(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
174 | void slot_actionNewVertex(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
175 | void slot_actionUndo(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
176 | void slot_actionRedo(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
177 | void slot_actionCut(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
178 | void slot_actionCopy(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
179 | void slot_actionPaste(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
180 | void slot_actionDelete(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
181 | void slot_actionSelectAll(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
182 | void slot_actionSelectByColor(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
183 | void slot_actionSelectByType(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
184 | void slot_actionModeDraw(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
185 | void slot_actionModeSelect(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
186 | void slot_actionModeCircle(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
187 | void slot_actionSetDrawDepth(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
188 | void slot_actionSetColor(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
189 | void slot_actionAutocolor(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
190 | void slot_actionUncolorize(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
191 | void slot_actionInline(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
192 | void slot_actionInlineDeep(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
193 | void slot_actionInvert(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
194 | void slot_actionMakePrimitive(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
195 | void slot_actionSplitQuads(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
196 | void slot_actionEditRaw(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
197 | void slot_actionBorders(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
198 | void slot_actionCornerVerts(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
199 | void slot_actionRoundCoordinates(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
200 | void slot_actionVisibilityHide(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
201 | void slot_actionVisibilityReveal(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
202 | void slot_actionVisibilityToggle(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
203 | void slot_actionReplaceCoords(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
204 | void slot_actionFlip(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
205 | void slot_actionDemote(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
206 | void slot_actionYtruder(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
207 | void slot_actionRectifier(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
208 | void slot_actionIntersector(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
209 | void slot_actionIsecalc(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
210 | void slot_actionCoverer(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
211 | void slot_actionEdger2(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
212 | void slot_actionHelp(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
213 | void slot_actionAbout(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
214 | void slot_actionAboutQt(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
215 | void slot_actionGridCoarse(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
216 | void slot_actionGridMedium(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
217 | void slot_actionGridFine(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
218 | void slot_actionEdit(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
219 | void slot_actionMoveUp(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
220 | void slot_actionMoveDown(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
221 | void slot_actionMoveXNeg(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
222 | void slot_actionMoveXPos(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
223 | void slot_actionMoveYNeg(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
224 | void slot_actionMoveYPos(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
225 | void slot_actionMoveZNeg(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
226 | void slot_actionMoveZPos(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
227 | void slot_actionRotateXNeg(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
228 | void slot_actionRotateXPos(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
229 | void slot_actionRotateYNeg(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
230 | void slot_actionRotateYPos(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
231 | void slot_actionRotateZNeg(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
232 | void slot_actionRotateZPos(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
233 | void slot_actionRotationPoint(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
234 | void slot_actionAddHistoryLine(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
235 | void slot_actionJumpTo(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
236 | void slot_actionSubfileSelection(); |
507e5d5c348c
- removed the horrible actions.h hack in favor of usage of Qt's meta object system
Santeri Piippo <crimsondusk64@gmail.com>
parents:
575
diff
changeset
|
237 | void slot_actionDrawAngles(); |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
238 | |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
239 | protected: |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
240 | void closeEvent (QCloseEvent* ev); |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
241 | |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
242 | private: |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
243 | GLRenderer* m_renderer; |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
244 | QProgressBar* m_primLoaderBar; |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
245 | QWidget* m_primLoaderWidget; |
504
6a1fa662bfc1
Removed the List -> QList alias, use QList directly
Santeri Piippo <crimsondusk64@gmail.com>
parents:
498
diff
changeset
|
246 | QList<LDObject*> m_sel; |
6a1fa662bfc1
Removed the List -> QList alias, use QList directly
Santeri Piippo <crimsondusk64@gmail.com>
parents:
498
diff
changeset
|
247 | QList<LDQuickColor> m_quickColors; |
6a1fa662bfc1
Removed the List -> QList alias, use QList directly
Santeri Piippo <crimsondusk64@gmail.com>
parents:
498
diff
changeset
|
248 | QList<QToolButton*> m_colorButtons; |
6a1fa662bfc1
Removed the List -> QList alias, use QList directly
Santeri Piippo <crimsondusk64@gmail.com>
parents:
498
diff
changeset
|
249 | QList<QAction*> m_recentFiles; |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
250 | MessageManager* m_msglog; |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
251 | Ui_LDForgeUI* ui; |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
252 | |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
253 | private slots: |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
254 | void slot_selectionChanged(); |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
255 | void slot_recentFile(); |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
256 | void slot_quickColor(); |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
257 | void slot_lastSecondCleanup(); |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
258 | void slot_editObject (QListWidgetItem* listitem); |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
259 | }; |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
260 | |
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
261 | // ----------------------------------------------------------------------------- |
335
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
262 | // Pointer to the instance of ForgeWindow. |
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
263 | extern ForgeWindow* g_win; |
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
264 | |
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
265 | // ----------------------------------------------------------------------------- |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
266 | // Other GUI-related stuff not directly part of ForgeWindow: |
395
5210bcb1d7e0
Further restructure, removed GUI toolbar icon size slider (always 22x22 now)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
388
diff
changeset
|
267 | QPixmap getIcon (str iconName); // Get an icon from the resource dir |
504
6a1fa662bfc1
Removed the List -> QList alias, use QList directly
Santeri Piippo <crimsondusk64@gmail.com>
parents:
498
diff
changeset
|
268 | QList<LDQuickColor> quickColorsFromConfig(); // Make a list of quick colors based on config |
395
5210bcb1d7e0
Further restructure, removed GUI toolbar icon size slider (always 22x22 now)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
388
diff
changeset
|
269 | bool confirm (str title, str msg); // Generic confirm prompt |
5210bcb1d7e0
Further restructure, removed GUI toolbar icon size slider (always 22x22 now)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
388
diff
changeset
|
270 | bool confirm (str msg); // Generic confirm prompt |
5210bcb1d7e0
Further restructure, removed GUI toolbar icon size slider (always 22x22 now)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
388
diff
changeset
|
271 | void critical (str msg); // Generic error prompt |
498
791c831c8020
further cleansing - removed most uses of unsigned ints, removed list reversers
Santeri Piippo <crimsondusk64@gmail.com>
parents:
493
diff
changeset
|
272 | QIcon makeColorIcon (LDColor* colinfo, const int size); // Makes an icon for the given color |
539
72ad83a67165
- upgraded the PROPERTY macro, resulting in a major code refactor
Santeri Piippo <crimsondusk64@gmail.com>
parents:
538
diff
changeset
|
273 | void makeColorComboBox (QComboBox* box); // Fills the given combo-box with color information |
498
791c831c8020
further cleansing - removed most uses of unsigned ints, removed list reversers
Santeri Piippo <crimsondusk64@gmail.com>
parents:
493
diff
changeset
|
274 | QImage imageFromScreencap (uchar* data, int w, int h); |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
275 | |
335
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
276 | // ============================================================================= |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
277 | // ----------------------------------------------------------------------------- |
335
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
278 | // Takes in pairs of radio buttons and respective values and returns the value of |
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
279 | // the first found radio button that was checked. |
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
280 | // ============================================================================= |
539
72ad83a67165
- upgraded the PROPERTY macro, resulting in a major code refactor
Santeri Piippo <crimsondusk64@gmail.com>
parents:
538
diff
changeset
|
281 | template<class T> |
72ad83a67165
- upgraded the PROPERTY macro, resulting in a major code refactor
Santeri Piippo <crimsondusk64@gmail.com>
parents:
538
diff
changeset
|
282 | T radioSwitch (const T& defval, QList<pair<QRadioButton*, T>> haystack) |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
283 | { for (pair<QRadioButton*, const T&> i : haystack) |
382
c1642530ea35
Converted ForgeWindow to Designer UI(!)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
364
diff
changeset
|
284 | if (i.first->isChecked()) |
335
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
285 | return i.second; |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
286 | |
335
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
287 | return defval; |
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
288 | } |
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
289 | |
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
290 | // ============================================================================= |
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
291 | // ----------------------------------------------------------------------------- |
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
292 | // Takes in pairs of radio buttons and respective values and checks the first |
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
293 | // found radio button to have the given value. |
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
294 | // ============================================================================= |
539
72ad83a67165
- upgraded the PROPERTY macro, resulting in a major code refactor
Santeri Piippo <crimsondusk64@gmail.com>
parents:
538
diff
changeset
|
295 | template<class T> |
72ad83a67165
- upgraded the PROPERTY macro, resulting in a major code refactor
Santeri Piippo <crimsondusk64@gmail.com>
parents:
538
diff
changeset
|
296 | void radioDefault (const T& expr, QList<pair<QRadioButton*, T>> haystack) |
493
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
297 | { for (pair<QRadioButton*, const T&> i : haystack) |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
298 | { if (i.second == expr) |
16766ac1bbd9
last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents:
480
diff
changeset
|
299 | { i.first->setChecked (true); |
335
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
300 | return; |
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
301 | } |
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
302 | } |
30c11cff511d
Converted overlay prompt
Santeri Piippo <crimsondusk64@gmail.com>
parents:
328
diff
changeset
|
303 | } |
183
f1b8cb53d2a2
Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
304 | |
538
2f85d4d286e5
- ensured header files' guards start with LDFORGE_
Santeri Piippo <crimsondusk64@gmail.com>
parents:
534
diff
changeset
|
305 | #endif // LDFORGE_GUI_H |