diff options
Diffstat (limited to 'keyvalue.h')
| -rw-r--r-- | keyvalue.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/keyvalue.h b/keyvalue.h new file mode 100644 index 0000000..b5b7b79 --- /dev/null +++ b/keyvalue.h @@ -0,0 +1,26 @@ +#pragma once + +// goodies +#include "g_object.h" +#include "g_property.h" + +class Q_DECL_EXPORT KeyValue : public G_Object +{ + Q_OBJECT + + G_PROPERTY(QVariant, key); + G_PROPERTY(QVariant, value); + +public: + explicit KeyValue( + const QVariant& key = "", + const QVariant& value = "", + QObject* parent = nullptr + ); + + G_OBJECT(G_Object, KeyValue) + ASSIGN_OPERATOR(G_Object, KeyValue) +}; + +Q_DECLARE_METATYPE(KeyValue) +Q_DECLARE_METATYPE(QVector<KeyValue>) |
