Utils::TypedAspect Class
template <typename ValueType> class Utils::TypedAspectThe TypedAspect class is a helper class for implementing a simple aspect. More...
| Header: | #include <utils/aspects.h> |
| Inherits: | Utils::BaseAspect |
| Inherited By: | Utils::BoolAspect, Utils::DoubleAspect, Utils::FilePathAspect, Utils::FilePathListAspect, Utils::IntegerAspect, Utils::MultiSelectionAspect, Utils::SelectionAspect, Utils::StringAspect, and Utils::StringListAspect |
Public Functions
| void | setDefaultValue(const ValueType &value) |
Reimplemented Public Functions
| virtual bool | isDefaultValue() const override |
| virtual bool | isDirty() override |
Reimplemented Protected Functions
| virtual bool | bufferToInternal() override |
| virtual QVariant | defaultVariantValue() const override |
| virtual bool | internalToBuffer() override |
| virtual void | setDefaultVariantValue(const QVariant &value) override |
| virtual void | setVariantValue(const QVariant &value, Utils::BaseAspect::Announcement howToAnnounce = DoEmit) override |
| virtual QVariant | variantValue() const override |
| virtual QVariant | volatileVariantValue() const override |
Detailed Description
A typed aspect contains a single piece of data that is of the type ValueType.
Member Function Documentation
void TypedAspect::setDefaultValue(const ValueType &value)
Sets a default value and the current value for this aspect.
Note: The current value will be set silently to the same value. It is reasonable to only set default values in the setup phase of the aspect.
Default values will not be stored in settings.