Tue, 14 Jun 2022 20:44:07 +0300
Further reduce settings.h
218
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
1 | #include <QMdiArea> |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
2 | #include "libraries.h" |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
3 | #include "gl/common.h" |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
4 | |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
5 | #ifndef SETTING |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
6 | enum class Setting { |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
7 | # define SETTING(NAME, DEFVALUE) NAME, |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
8 | # define AUTOMATIC_SETTINGS_DEF |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
9 | #endif |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
10 | |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
11 | // Rendering options |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
12 | SETTING(Locale, QString{"system"}) |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
13 | SETTING(BackgroundColor, (QColor{48, 48, 48})) |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
14 | SETTING(MainColor, (QColor{255, 255, 64})) |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
15 | SETTING(SelectedColor, (QColor{32, 32, 224})) |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
16 | SETTING(LineThickness, 2.0f) |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
17 | SETTING(LineAntiAliasing, true) |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
18 | SETTING(RenderStyle, gl::RenderStyle::Normal) |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
19 | SETTING(DrawWireframe, false) |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
20 | SETTING(DrawAxes, true) |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
21 | SETTING(MainWindowGeometry, QByteArray{}) |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
22 | SETTING(MainSplitterState, QByteArray{}) |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
23 | SETTING(RecentFiles, QStringList{}) |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
24 | SETTING(ViewMode, QMdiArea::TabbedView) |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
25 | |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
26 | // File management options |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
27 | SETTING(Libraries, QVector<Library>{}) |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
28 | |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
29 | #ifdef AUTOMATIC_SETTINGS_DEF |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
30 | }; |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
31 | # undef SETTING |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
32 | # undef AUTOMATIC_SETTINGS_DEF |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
diff
changeset
|
33 | #endif |