mirror of
https://github.com/status-im/dotherside.git
synced 2025-02-08 10:44:45 +00:00
39 lines
927 B
C
39 lines
927 B
C
|
#pragma once
|
||
|
|
||
|
#include <QtCore/QString>
|
||
|
#include <QtCore/QMetaType>
|
||
|
#include <memory>
|
||
|
|
||
|
class QString;
|
||
|
class PropertyData;
|
||
|
|
||
|
class DynamicProperty
|
||
|
{
|
||
|
public:
|
||
|
DynamicProperty();
|
||
|
DynamicProperty(const QString& name,
|
||
|
QMetaType::Type type,
|
||
|
const QString& readSlotName,
|
||
|
const QString& writeSlotName = QString(),
|
||
|
const QString& notifySignalName = QString());
|
||
|
DynamicProperty(const DynamicProperty& other);
|
||
|
DynamicProperty& operator=(const DynamicProperty& other);
|
||
|
~DynamicProperty();
|
||
|
|
||
|
QString name() const;
|
||
|
QMetaType::Type type() const;
|
||
|
|
||
|
bool isValid() const { return d != nullptr; }
|
||
|
|
||
|
bool isReadable() const;
|
||
|
bool isWriteable() const;
|
||
|
bool hasNotifySignal() const;
|
||
|
|
||
|
QString readSlot() const;
|
||
|
QString writeSlot() const;
|
||
|
QString notifySignal() const;
|
||
|
|
||
|
private:
|
||
|
std::unique_ptr<PropertyData> d;
|
||
|
};
|