19 #ifndef _STELPROPERTYMGR_HPP_ 20 #define _STELPROPERTYMGR_HPP_ 24 #include <QMetaProperty> 59 void propertyChanged(
int value);
72 void propertyChanged(
bool value);
85 void propertyChanged(
double value);
213 QString
getId()
const {
return id; }
216 QVariant getValue()
const;
224 bool setValue(
const QVariant& value)
const;
227 bool isReadOnly()
const;
230 bool canNotify()
const;
233 QMetaType::Type getType()
const;
242 void changed(
const QVariant& newValue);
245 void propertyChanged();
261 typedef QMap<QString,StelProperty*> StelPropertyMap;
273 StelProperty* registerProperty(
const QString&
id, QObject* target,
const char* propertyName);
279 void registerObject(QObject *obj);
282 QStringList getPropertyList()
const;
284 QList<StelProperty*> getAllProperties()
const;
295 QVariant getStelPropertyValue(
const QString&
id)
const;
301 bool setStelPropertyValue(
const QString&
id,
const QVariant &value)
const;
303 QMetaProperty getMetaProperty(
const QString&
id)
const;
305 void onStelPropChanged(
const QVariant& val);
310 void stelPropChanged(
const QString&
id,
const QVariant& value);
312 StelProperty* registerProperty(
const QString &
id, QObject *target,
const QMetaProperty&
prop);
314 QMap<QString,QObject*> registeredObjects;
315 StelPropertyMap propMap;
A StelPropertyProxy for bool-based properties.
Wrapper around a Q_PROPERTY (see the Qt property system for more information) of a specific object...
QMetaProperty getMetaProp() const
Returns the actual Q_PROPERTY wrapped by this instance.
StelProperty * prop
The connected property, set by the constructor.
const StelPropertyMap & getPropertyMap() const
Returns a map from property IDs to StelProperty objects.
A StelPropertyProxy for double-based properties.
Manages the registration of specific object properties with the StelProperty system.
Abstract base class for a StelProperty proxy implementation, which allow reacting to the StelProperty...
QObject * getTarget() const
Returns the object to which this property belongs.
A StelPropertyProxy for int-based properties.
QString getId() const
Returns the unique ID which is used to identify this property.
virtual void onPropertyChanged(const QVariant &value)=0
This is connected by the constructor to the StelProperty::changed event of the connected property...