Union::Properties::SizePropertyGroup Class
class Union::Properties::SizePropertyGroupA property group representing a set of sizes for cardinal directions. More...
| Header: | #include <SizePropertyGroup.h> |
| CMake: | find_package(Union REQUIRED)target_link_libraries(mytarget PRIVATE Union::Union) |
Public Functions
| SizePropertyGroup() | |
| SizePropertyGroup(const Union::Properties::SizePropertyGroup &other) | |
| SizePropertyGroup(Union::Properties::SizePropertyGroup &&other) | |
| std::optional<qreal> | bottom() const |
| bool | hasAnyValue() const |
| bool | isEmpty() const |
| std::optional<qreal> | left() const |
| std::optional<qreal> | right() const |
| void | setBottom(const std::optional<qreal> &newValue) |
| void | setLeft(const std::optional<qreal> &newValue) |
| void | setRight(const std::optional<qreal> &newValue) |
| void | setTop(const std::optional<qreal> &newValue) |
| QMarginsF | toMargins() const |
| QString | toString(int indentation = 0, Union::Properties::ToStringFlags flags = ToStringFlags{}) const |
| std::optional<qreal> | top() const |
| Union::Properties::SizePropertyGroup & | operator=(Union::Properties::SizePropertyGroup &&other) |
| Union::Properties::SizePropertyGroup & | operator=(const Union::Properties::SizePropertyGroup &other) |
Static Public Members
| std::unique_ptr<Union::Properties::SizePropertyGroup> | empty() |
| void | resolveProperties(const Union::Properties::SizePropertyGroup *source, Union::Properties::SizePropertyGroup *destination) |
Related Non-Members
| QDebug | operator<<(QDebug debug, Union::Properties::SizePropertyGroup *type) |
| bool | operator==(const Union::Properties::SizePropertyGroup &left, const Union::Properties::SizePropertyGroup &right) |
Detailed Description
Member Function Documentation
SizePropertyGroup::SizePropertyGroup()
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.
SizePropertyGroup::SizePropertyGroup(const Union::Properties::SizePropertyGroup &other)
Copy constructor.
SizePropertyGroup::SizePropertyGroup(Union::Properties::SizePropertyGroup &&other)
Move constructor.
std::optional<qreal> SizePropertyGroup::bottom() const
The size of the bottom side.
See also setBottom().
[static] std::unique_ptr<Union::Properties::SizePropertyGroup> SizePropertyGroup::empty()
Create and return an empty SizePropertyGroup instance.
This will create an empty SizePropertyGroup 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 SizePropertyGroup::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.
bool SizePropertyGroup::isEmpty() const
Returns if this property is considered empty.
A property is considered empty if it has no values or if the values it contains are all considered empty values.
std::optional<qreal> SizePropertyGroup::left() const
The size of the left side.
See also setLeft().
[static] void SizePropertyGroup::resolveProperties(const Union::Properties::SizePropertyGroup *source, Union::Properties::SizePropertyGroup *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.
std::optional<qreal> SizePropertyGroup::right() const
The size of the right side.
See also setRight().
void SizePropertyGroup::setBottom(const std::optional<qreal> &newValue)
Set the value of bottom.
newValue The new value or std::nullopt to unset the value.
See also bottom().
void SizePropertyGroup::setLeft(const std::optional<qreal> &newValue)
Set the value of left.
newValue The new value or std::nullopt to unset the value.
See also left().
void SizePropertyGroup::setRight(const std::optional<qreal> &newValue)
Set the value of right.
newValue The new value or std::nullopt to unset the value.
See also right().
void SizePropertyGroup::setTop(const std::optional<qreal> &newValue)
Set the value of top.
newValue The new value or std::nullopt to unset the value.
See also top().
QMarginsF SizePropertyGroup::toMargins() const
Convert a Size property to QMarginsF.
If any values are not set, they will use 0.0.
QString SizePropertyGroup::toString(int indentation = 0, Union::Properties::ToStringFlags flags = ToStringFlags{}) const
Returns a string representation of this property group.
This is intended for debugging.
indentation The amount of indentation to apply. Defaults to 0. flags A set of flags that control conversion behavior.
std::optional<qreal> SizePropertyGroup::top() const
The size of the top side.
See also setTop().
Union::Properties::SizePropertyGroup &SizePropertyGroup::operator=(Union::Properties::SizePropertyGroup &&other)
Move assignment operator.
Union::Properties::SizePropertyGroup &SizePropertyGroup::operator=(const Union::Properties::SizePropertyGroup &other)
Copy assignment operator.
Related Non-Members
QDebug operator<<(QDebug debug, Union::Properties::SizePropertyGroup *type)
QDebug support for SizePropertyGroup.
bool operator==(const Union::Properties::SizePropertyGroup &left, const Union::Properties::SizePropertyGroup &right)
Equality comparison for SizePropertyGroup.