Union::Properties::OffsetProperty Class
class Union::Properties::OffsetProperty| Header: | #include <OffsetProperty> |
| CMake: | find_package(Union REQUIRED)target_link_libraries(mytarget PRIVATE Union::Union) |
Public Functions
| OffsetProperty() | |
| OffsetProperty(const Union::Properties::OffsetProperty &other) | |
| OffsetProperty(Union::Properties::OffsetProperty &&other) | |
| bool | hasAnyValue() const |
| std::optional<qreal> | horizontal() const |
| void | setHorizontal(const std::optional<qreal> &newValue) |
| void | setVertical(const std::optional<qreal> &newValue) |
| QVector2D | toVector2D() const |
| std::optional<qreal> | vertical() const |
| Union::Properties::OffsetProperty & | operator=(Union::Properties::OffsetProperty &&other) |
| Union::Properties::OffsetProperty & | operator=(const Union::Properties::OffsetProperty &other) |
Static Public Members
| Union::Properties::OffsetProperty | empty() |
| void | resolveProperties(const Union::Properties::OffsetProperty &source, Union::Properties::OffsetProperty &destination) |
Related Non-Members
| QDebug | operator<<(QDebug debug, const Union::Properties::OffsetProperty &type) |
| bool | operator==(const Union::Properties::OffsetProperty &left, const Union::Properties::OffsetProperty &right) |
Detailed Description
Member Function Documentation
OffsetProperty::OffsetProperty()
Default constructor. Constructs a null instance.
A null instance in this case means an instance that does not have any values for its properties. This includes property groups.
OffsetProperty::OffsetProperty(const Union::Properties::OffsetProperty &other)
Copy constructor.
OffsetProperty::OffsetProperty(Union::Properties::OffsetProperty &&other)
Move constructor.
[static] Union::Properties::OffsetProperty OffsetProperty::empty()
Create and return an empty OffsetProperty instance.
This will create an empty OffsetProperty instance, which is defined as an instance with all of its values default-constructed. Note that this is different from a default-constructed instance which will have all its values unset.
bool OffsetProperty::hasAnyValue() const
Returns if this property group has any value set.
Note that for any property that is also a property group, this will also check if that group has any value.
std::optional<qreal> OffsetProperty::horizontal() const
Returns the value of horizontal.
See also setHorizontal().
[static] void OffsetProperty::resolveProperties(const Union::Properties::OffsetProperty &source, Union::Properties::OffsetProperty &destination)
Copy property values from source to destination if destination does not have a property value.
This will recursively copy property values of grouped properties.
source The source property group to copy from. destination The destination property group to copy to.
void OffsetProperty::setHorizontal(const std::optional<qreal> &newValue)
Set the value of horizontal.
newValue The new value or std::nullopt to unset the value.
See also horizontal().
void OffsetProperty::setVertical(const std::optional<qreal> &newValue)
Set the value of vertical.
newValue The new value or std::nullopt to unset the value.
See also vertical().
QVector2D OffsetProperty::toVector2D() const
Convert an Offset property to QVector2D.
If any values are not set, they will use 0.0.
std::optional<qreal> OffsetProperty::vertical() const
Returns the value of vertical.
See also setVertical().
Union::Properties::OffsetProperty &OffsetProperty::operator=(Union::Properties::OffsetProperty &&other)
Move assignment operator.
Union::Properties::OffsetProperty &OffsetProperty::operator=(const Union::Properties::OffsetProperty &other)
Copy assignment operator.
Related Non-Members
QDebug operator<<(QDebug debug, const Union::Properties::OffsetProperty &type)
QDebug support for OffsetProperty.
bool operator==(const Union::Properties::OffsetProperty &left, const Union::Properties::OffsetProperty &right)
Equality comparison for OffsetProperty.