-
Notifications
You must be signed in to change notification settings - Fork 23
/
aogproperty.h
46 lines (35 loc) · 1.12 KB
/
aogproperty.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef AOGPROPERTY_H
#define AOGPROPERTY_H
#include <QVector>
#include <QVariant>
class AOGSettings;
extern AOGSettings *settings;
class AOGProperty
{
protected:
const QString key;
const QVariant default_value;
const QVector<int> default_list;
public:
inline static QMap<QString, QVariant> default_map;
static void add_default_map (const QString &key, const QVariant &default_value);
static void init_defaults();
AOGProperty(const QString key, const QVariant &defaultvalue);
AOGProperty(const QString key, const QVector<int> &defaultvalue);
operator int();
operator char();
operator double();
operator QString();
operator bool();
operator float();
operator QColor();
//special case for QVector<int>. In AOGSettings, this type is marshalled as
//a QVariantList so that the ini file has human-readable text in it.
operator QVector<int>();
QVariant value(void);
AOGProperty &operator=(QVariant newvalue);
AOGProperty &operator=(QVector<int> newvalue);
};
extern AOGProperty property_environment_last_name;
#include "properties.h"
#endif // AOGPROPERTY_H