src/config.h

Tue, 07 Jan 2014 08:53:27 +0200

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Tue, 07 Jan 2014 08:53:27 +0200
changeset 603
47e7773c7841
parent 600
209e3f1f7b2c
child 606
3dd6f343ec06
permissions
-rw-r--r--

- reformatting

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
600
209e3f1f7b2c - updated copyright year. Best wishes for 2014!
Santeri Piippo <crimsondusk64@gmail.com>
parents: 590
diff changeset
3 * Copyright (C) 2013, 2014 Santeri Piippo
359
bcdfc801658b more restyle/refactor
Santeri Piippo <crimsondusk64@gmail.com>
parents: 299
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.
359
bcdfc801658b more restyle/refactor
Santeri Piippo <crimsondusk64@gmail.com>
parents: 299
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.
359
bcdfc801658b more restyle/refactor
Santeri Piippo <crimsondusk64@gmail.com>
parents: 299
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
497
c51941e590b6 a bit more cleanup
Santeri Piippo <crimsondusk64@gmail.com>
parents: 493
diff changeset
19 #ifndef LDFORGE_CONFIG_H
c51941e590b6 a bit more cleanup
Santeri Piippo <crimsondusk64@gmail.com>
parents: 493
diff changeset
20 #define LDFORGE_CONFIG_H
183
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
21
590
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
22 #include "property.h"
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
23
183
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
24 // =============================================================================
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
25 #include <QString>
467
59549731151a Added ListConfig type, using it in recent files now
Santeri Piippo <crimsondusk64@gmail.com>
parents: 465
diff changeset
26 #include <QVariant>
298
f945fc8dae9e Nuked the now-empty string.cpp/.h
Santeri Piippo <crimsondusk64@gmail.com>
parents: 286
diff changeset
27 #include <QKeySequence>
436
4268a5507725 Converted configuration code to use QSettings.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 421
diff changeset
28 class QSettings;
298
f945fc8dae9e Nuked the now-empty string.cpp/.h
Santeri Piippo <crimsondusk64@gmail.com>
parents: 286
diff changeset
29
538
2f85d4d286e5 - ensured header files' guards start with LDFORGE_
Santeri Piippo <crimsondusk64@gmail.com>
parents: 497
diff changeset
30 typedef QChar QChar;
298
f945fc8dae9e Nuked the now-empty string.cpp/.h
Santeri Piippo <crimsondusk64@gmail.com>
parents: 286
diff changeset
31 typedef QString str;
183
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
32
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
33 #define MAX_INI_LINE 512
239
ea09eeba1c2b Use a C-array for config too for the same reasons as with actions
Santeri Piippo <crimsondusk64@gmail.com>
parents: 189
diff changeset
34 #define MAX_CONFIG 512
183
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
35
590
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
36 #define cfg(T, NAME, DEFAULT) \
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
37 Config::T##Type NAME; \
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
38 T##Config config_##NAME (&NAME, #NAME, DEFAULT);
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
39
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
40 #define extern_cfg(T, NAME) extern Config::T##Type NAME;
183
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
41
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
42 // =========================================================
493
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
43 class Config
603
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
44 {
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
45 PROPERTY (private, str, Name, STR_OPS, STOCK_WRITE)
590
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
46
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
47 public:
493
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
48 enum Type
603
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
49 {
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
50 Int,
493
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
51 String,
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
52 Float,
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
53 Bool,
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
54 KeySequence,
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
55 List,
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
56 };
359
bcdfc801658b more restyle/refactor
Santeri Piippo <crimsondusk64@gmail.com>
parents: 299
diff changeset
57
590
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
58 using IntType = int;
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
59 using StringType = QString;
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
60 using FloatType = float;
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
61 using BoolType = bool;
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
62 using KeySequenceType = QKeySequence;
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
63 using ListType = QList<QVariant>;
359
bcdfc801658b more restyle/refactor
Santeri Piippo <crimsondusk64@gmail.com>
parents: 299
diff changeset
64
590
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
65 Config (str name);
493
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
66
590
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
67 virtual QVariant getDefaultAsVariant() const = 0;
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
68 virtual Type getType() const = 0;
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
69 virtual bool isDefault() const = 0;
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
70 virtual void loadFromVariant (const QVariant& val) = 0;
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
71 virtual void resetValue() = 0;
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
72 virtual QVariant toVariant() const = 0;
493
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
73
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
74 // ------------------------------------------
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
75 static bool load();
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
76 static bool save();
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
77 static void reset();
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
78 static str dirpath();
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
79 static str filepath (str file);
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
80
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
81 protected:
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
82 static void addToArray (Config* ptr);
183
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
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
85 // =============================================================================
603
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
86 #define IMPLEMENT_CONFIG(NAME) \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
87 public: \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
88 using ValueType = Config::NAME##Type; \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
89 \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
90 NAME##Config (ValueType* valueptr, str name, ValueType def) : \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
91 Config (name), \
590
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
92 m_valueptr (valueptr), \
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
93 m_default (def) \
603
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
94 { \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
95 Config::addToArray (this); \
590
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
96 *m_valueptr = def; \
603
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
97 } \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
98 \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
99 inline ValueType getValue() const \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
100 { \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
101 return *m_valueptr; \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
102 } \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
103 \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
104 inline void setValue (ValueType val) \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
105 { \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
106 *m_valueptr = val; \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
107 } \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
108 \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
109 virtual Config::Type getType() const \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
110 { \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
111 return Config::NAME; \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
112 } \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
113 \
590
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
114 virtual void resetValue() \
603
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
115 { \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
116 *m_valueptr = m_default; \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
117 } \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
118 \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
119 virtual const ValueType& getDefault() const \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
120 { \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
121 return m_default; \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
122 } \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
123 \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
124 virtual bool isDefault() const \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
125 { \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
126 return *m_valueptr == m_default; \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
127 } \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
128 \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
129 virtual void loadFromVariant (const QVariant& val) \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
130 { \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
131 *m_valueptr = val.value<ValueType>(); \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
132 } \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
133 \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
134 virtual QVariant toVariant() const \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
135 { \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
136 return QVariant::fromValue<ValueType> (*m_valueptr); \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
137 } \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
138 \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
139 virtual QVariant getDefaultAsVariant() const \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
140 { \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
141 return QVariant::fromValue<ValueType> (m_default); \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
142 } \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
143 \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
144 static NAME##Config* getByName (str name); \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
145 \
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
146 private: \
590
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
147 ValueType* m_valueptr; \
7aec744ce97b - refactored config code
Santeri Piippo <crimsondusk64@gmail.com>
parents: 587
diff changeset
148 ValueType m_default;
183
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
149
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
150 // =============================================================================
493
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
151 class IntConfig : public Config
603
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
152 {
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
153 IMPLEMENT_CONFIG (Int)
183
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
154 };
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
155
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
156 // =============================================================================
493
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
157 class StringConfig : public Config
603
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
158 {
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
159 IMPLEMENT_CONFIG (String)
183
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
160 };
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
161
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
162 // =============================================================================
493
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
163 class FloatConfig : public Config
603
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
164 {
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
165 IMPLEMENT_CONFIG (Float)
183
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
166 };
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
167
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
168 // =============================================================================
493
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
169 class BoolConfig : public Config
603
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
170 {
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
171 IMPLEMENT_CONFIG (Bool)
183
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
172 };
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
173
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
174 // =============================================================================
493
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
175 class KeySequenceConfig : public Config
603
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
176 {
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
177 IMPLEMENT_CONFIG (KeySequence)
183
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
178 };
f1b8cb53d2a2 Moved source files to src/, removed zz_ prefix off dialog files.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
179
467
59549731151a Added ListConfig type, using it in recent files now
Santeri Piippo <crimsondusk64@gmail.com>
parents: 465
diff changeset
180 // =============================================================================
493
16766ac1bbd9 last code reformatting i swear
Santeri Piippo <crimsondusk64@gmail.com>
parents: 471
diff changeset
181 class ListConfig : public Config
603
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
182 {
47e7773c7841 - reformatting
Santeri Piippo <crimsondusk64@gmail.com>
parents: 600
diff changeset
183 IMPLEMENT_CONFIG (List)
467
59549731151a Added ListConfig type, using it in recent files now
Santeri Piippo <crimsondusk64@gmail.com>
parents: 465
diff changeset
184 };
59549731151a Added ListConfig type, using it in recent files now
Santeri Piippo <crimsondusk64@gmail.com>
parents: 465
diff changeset
185
497
c51941e590b6 a bit more cleanup
Santeri Piippo <crimsondusk64@gmail.com>
parents: 493
diff changeset
186 #endif // LDFORGE_CONFIG_H

mercurial