22 #include <QKeySequence> |
22 #include <QKeySequence> |
23 #include "macros.h" |
23 #include "macros.h" |
24 #include "basics.h" |
24 #include "basics.h" |
25 |
25 |
26 class QSettings; |
26 class QSettings; |
|
27 class AbstractConfigEntry; |
27 |
28 |
28 #define CFGENTRY(T, NAME, DEFAULT) namespace cfg { AbstractConfigEntry::T##Type NAME; } |
29 #define CFGENTRY(T, NAME, DEFAULT) namespace cfg { AbstractConfigEntry::T##Type NAME; } |
29 #define EXTERN_CFGENTRY(T, NAME) namespace cfg { extern AbstractConfigEntry::T##Type NAME; } |
30 #define EXTERN_CFGENTRY(T, NAME) namespace cfg { extern AbstractConfigEntry::T##Type NAME; } |
30 |
31 |
31 namespace Config |
32 namespace Config |
35 bool Save(); |
36 bool Save(); |
36 void ResetToDefaults(); |
37 void ResetToDefaults(); |
37 QString DirectoryPath(); |
38 QString DirectoryPath(); |
38 QString FilePath (QString file); |
39 QString FilePath (QString file); |
39 QSettings* SettingsObject(); |
40 QSettings* SettingsObject(); |
|
41 QList<AbstractConfigEntry*> const& AllConfigEntries(); |
|
42 AbstractConfigEntry* FindByName (QString const& name); |
40 } |
43 } |
41 |
44 |
42 class AbstractConfigEntry |
45 class AbstractConfigEntry |
43 { |
46 { |
44 PROPERTY (private, QString, name, setName, STOCK_WRITE) |
47 PROPERTY (private, QString, name, setName, STOCK_WRITE) |