Union::Properties::CornerPropertyGroup Class

class Union::Properties::CornerPropertyGroup

A property group containing the properties of a corner. More...

Header: #include <CornerPropertyGroup.h>
CMake: find_package(Union REQUIRED)
target_link_libraries(mytarget PRIVATE Union::Union)

Public Functions

CornerPropertyGroup()
CornerPropertyGroup(const Union::Properties::CornerPropertyGroup &other)
CornerPropertyGroup(Union::Properties::CornerPropertyGroup &&other)
bool hasAnyValue() const
bool isEmpty() const
std::optional<qreal> radius() const
void setRadius(const std::optional<qreal> &newValue)
QString toString(int indentation = 0, Union::Properties::ToStringFlags flags = ToStringFlags{}) const
Union::Properties::CornerPropertyGroup &operator=(Union::Properties::CornerPropertyGroup &&other)
Union::Properties::CornerPropertyGroup &operator=(const Union::Properties::CornerPropertyGroup &other)

Static Public Members

std::unique_ptr<Union::Properties::CornerPropertyGroup> empty()
void resolveProperties(const Union::Properties::CornerPropertyGroup *source, Union::Properties::CornerPropertyGroup *destination)
QDebug operator<<(QDebug debug, Union::Properties::CornerPropertyGroup *type)
bool operator==(const Union::Properties::CornerPropertyGroup &left, const Union::Properties::CornerPropertyGroup &right)

Detailed Description

Member Function Documentation

CornerPropertyGroup::CornerPropertyGroup()

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.

CornerPropertyGroup::CornerPropertyGroup(const Union::Properties::CornerPropertyGroup &other)

Copy constructor.

CornerPropertyGroup::CornerPropertyGroup(Union::Properties::CornerPropertyGroup &&other)

Move constructor.

[static] std::unique_ptr<Union::Properties::CornerPropertyGroup> CornerPropertyGroup::empty()

Create and return an empty CornerPropertyGroup instance.

This will create an empty CornerPropertyGroup 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 CornerPropertyGroup::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 CornerPropertyGroup::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> CornerPropertyGroup::radius() const

The radius of the corner.

See also setRadius().

[static] void CornerPropertyGroup::resolveProperties(const Union::Properties::CornerPropertyGroup *source, Union::Properties::CornerPropertyGroup *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 CornerPropertyGroup::setRadius(const std::optional<qreal> &newValue)

Set the value of radius.

newValue The new value or std::nullopt to unset the value.

See also radius().

QString CornerPropertyGroup::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.

Union::Properties::CornerPropertyGroup &CornerPropertyGroup::operator=(Union::Properties::CornerPropertyGroup &&other)

Move assignment operator.

Union::Properties::CornerPropertyGroup &CornerPropertyGroup::operator=(const Union::Properties::CornerPropertyGroup &other)

Copy assignment operator.

Related Non-Members

QDebug operator<<(QDebug debug, Union::Properties::CornerPropertyGroup *type)

QDebug support for CornerPropertyGroup.

bool operator==(const Union::Properties::CornerPropertyGroup &left, const Union::Properties::CornerPropertyGroup &right)

Equality comparison for CornerPropertyGroup.