StelPropertyMgr.hpp   StelPropertyMgr.hpp 
skipping to change at line 228 skipping to change at line 228
//! isReadOnly is false, meaning a WRITE function is defined on the Q_PROPERTY. //! isReadOnly is false, meaning a WRITE function is defined on the Q_PROPERTY.
//! Data type conversion is performed, if necessary, using the inter nal logic of //! Data type conversion is performed, if necessary, using the inter nal logic of
//! QVariant. This basically means that QVariant::canConvert() from the given value //! QVariant. This basically means that QVariant::canConvert() from the given value
//! to the actual data type of the Q_PROPERTY must be true for the o peration to succeed. //! to the actual data type of the Q_PROPERTY must be true for the o peration to succeed.
//! @return true if the new value was successfully set //! @return true if the new value was successfully set
bool setValue(const QVariant& value) const; bool setValue(const QVariant& value) const;
//! If false, setValue can be used. //! If false, setValue can be used.
bool isReadOnly() const; bool isReadOnly() const;
//! True when this property can be synchronized with external source
s.
//! This is the case when it is writable, and it is marked as \c STO
RED true (default).
bool isSynchronizable() const;
//! If true, the Q_PROPERTY has a NOTIFY signal and the changed() si gnal can be used //! If true, the Q_PROPERTY has a NOTIFY signal and the changed() si gnal can be used
bool canNotify() const; bool canNotify() const;
//! Returns the data type of the StelProperty //! Returns the data type of the StelProperty
QMetaType::Type getType() const; QMetaType::Type getType() const;
//! Returns the actual Q_PROPERTY wrapped by this instance //! Returns the actual Q_PROPERTY wrapped by this instance
QMetaProperty getMetaProp() const { return prop; } QMetaProperty getMetaProp() const { return prop; }
//! Returns the object to which this property belongs //! Returns the object to which this property belongs
skipping to change at line 287 skipping to change at line 291
//! StelProperty with an ID in the format `<objectName>.<propertyNam e>` is generated. //! StelProperty with an ID in the format `<objectName>.<propertyNam e>` is generated.
void registerObject(QObject *obj); void registerObject(QObject *obj);
//! Returns the keys of all registered StelProperties //! Returns the keys of all registered StelProperties
QStringList getPropertyList() const; QStringList getPropertyList() const;
//! Returns all currently registered StelProperty instances //! Returns all currently registered StelProperty instances
QList<StelProperty*> getAllProperties() const; QList<StelProperty*> getAllProperties() const;
//! Returns a map from property IDs to StelProperty objects //! Returns a map from property IDs to StelProperty objects
const StelPropertyMap& getPropertyMap() const { return propMap; } const StelPropertyMap& getPropertyMap() const { return propMap; }
//! Returns the StelProperty with the specified ID, or NULL if not r egistered //! Returns the StelProperty with the specified ID, or Q_NULLPTR if not registered
StelProperty* getProperty(const QString& id) const; StelProperty* getProperty(const QString& id) const;
//! Retrieves the current value of the given StelProperty, //! Retrieves the current value of the given StelProperty,
//! without requiring the retrieval of its object first. //! without requiring the retrieval of its object first.
//! @returns the current value of the StelProperty with the ID \p id , //! @returns the current value of the StelProperty with the ID \p id ,
//! or an invalid QVariant when no property with the given ID is fou nd. //! or an invalid QVariant when no property with the given ID is fou nd.
QVariant getStelPropertyValue(const QString& id) const; QVariant getStelPropertyValue(const QString& id) const;
//! Sets the value of the given StelProperty, //! Sets the value of the given StelProperty,
//! without requiring the retrieval of its object first. //! without requiring the retrieval of its object first.
//! @returns \c true when the value of the StelProperty with the ID \p id //! @returns \c true when the value of the StelProperty with the ID \p id
//! has been successfully changed, and \c false if the value change failed //! has been successfully changed, and \c false if the value change failed
//! or when no property with the given ID is found. //! or when no property with the given ID is found.
bool setStelPropertyValue(const QString& id, const QVariant &value) const; bool setStelPropertyValue(const QString& id, const QVariant &value) const;
//! Returns the QMetaProperty information for the given \p id. //! Returns the QMetaProperty information for the given \p id.
QMetaProperty getMetaProperty(const QString& id) const; QMetaProperty getMetaProperty(const QString& id) const;
private slots:
void onStelPropChanged(const QVariant& val);
signals: signals:
//! Emitted when any registered StelProperty has been changed //! Emitted when any registered StelProperty has been changed
//! @param id The unique id of the property that was changed //! @param prop The property that was changed
//! @param value The new value of the property //! @param value The new value of the property
void stelPropChanged(const QString& id, const QVariant& value); void stelPropertyChanged(StelProperty* prop, const QVariant& value);
private slots:
void onStelPropChanged(const QVariant& val);
private: private:
StelProperty* registerProperty(const QString &id, QObject *target, c onst QMetaProperty& prop); StelProperty* registerProperty(const QString &id, QObject *target, c onst QMetaProperty& prop);
QMap<QString,QObject*> registeredObjects; QMap<QString,QObject*> registeredObjects;
StelPropertyMap propMap; StelPropertyMap propMap;
}; };
#endif #endif
 End of changes. 5 change blocks. 
5 lines changed or deleted 11 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/