Union::Properties::CornerProperty Class

class Union::Properties::CornerProperty

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

Header: #include <CornerProperty>
CMake: find_package(Union REQUIRED)
target_link_libraries(mytarget PRIVATE Union::Union)

Public Functions

CornerProperty()
CornerProperty(const Union::Properties::CornerProperty &other)
CornerProperty(Union::Properties::CornerProperty &&other)
std::optional<QColor> color() const
bool hasAnyValue() const
std::optional<qreal> height() const
std::optional<Union::Properties::ImageProperty> image() const
std::optional<qreal> radius() const
void setColor(const std::optional<QColor> &newValue)
void setHeight(const std::optional<qreal> &newValue)
void setImage(const std::optional<Union::Properties::ImageProperty> &newValue)
void setRadius(const std::optional<qreal> &newValue)
void setWidth(const std::optional<qreal> &newValue)
std::optional<qreal> width() const
Union::Properties::CornerProperty &operator=(Union::Properties::CornerProperty &&other)
Union::Properties::CornerProperty &operator=(const Union::Properties::CornerProperty &other)

Static Public Members

Union::Properties::CornerProperty empty()
void resolveProperties(const Union::Properties::CornerProperty &source, Union::Properties::CornerProperty &destination)
QDebug operator<<(QDebug debug, const Union::Properties::CornerProperty &type)
bool operator==(const Union::Properties::CornerProperty &left, const Union::Properties::CornerProperty &right)

Detailed Description

Member Function Documentation

CornerProperty::CornerProperty()

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.

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

Copy constructor.

CornerProperty::CornerProperty(Union::Properties::CornerProperty &&other)

Move constructor.

std::optional<QColor> CornerProperty::color() const

Returns the value of color.

See also setColor().

[static] Union::Properties::CornerProperty CornerProperty::empty()

Create and return an empty CornerProperty instance.

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

Returns the value of height.

See also setHeight().

std::optional<Union::Properties::ImageProperty> CornerProperty::image() const

Returns the value of image.

See also setImage().

std::optional<qreal> CornerProperty::radius() const

Returns the value of radius.

See also setRadius().

[static] void CornerProperty::resolveProperties(const Union::Properties::CornerProperty &source, Union::Properties::CornerProperty &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 CornerProperty::setColor(const std::optional<QColor> &newValue)

Set the value of color.

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

See also color().

void CornerProperty::setHeight(const std::optional<qreal> &newValue)

Set the value of height.

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

See also height().

void CornerProperty::setImage(const std::optional<Union::Properties::ImageProperty> &newValue)

Set the value of image.

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

See also image().

void CornerProperty::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().

void CornerProperty::setWidth(const std::optional<qreal> &newValue)

Set the value of width.

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

See also width().

std::optional<qreal> CornerProperty::width() const

Returns the value of width.

See also setWidth().

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

Move assignment operator.

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

Copy assignment operator.

Related Non-Members

QDebug operator<<(QDebug debug, const Union::Properties::CornerProperty &type)

QDebug support for CornerProperty.

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

Equality comparison for CornerProperty.