Union::Properties::BackgroundProperty Class

class Union::Properties::BackgroundProperty

A property group containing properties related to an element's background. More...

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

Public Functions

BackgroundProperty()
BackgroundProperty(const Union::Properties::BackgroundProperty &other)
BackgroundProperty(Union::Properties::BackgroundProperty &&other)
std::optional<Union::Properties::BorderProperty> border() const
std::optional<QColor> color() const
std::optional<Union::Properties::CornersProperty> corners() const
bool hasAnyValue() const
std::optional<Union::Properties::ImageProperty> image() const
void setBorder(const std::optional<Union::Properties::BorderProperty> &newValue)
void setColor(const std::optional<QColor> &newValue)
void setCorners(const std::optional<Union::Properties::CornersProperty> &newValue)
void setImage(const std::optional<Union::Properties::ImageProperty> &newValue)
void setShadow(const std::optional<Union::Properties::ShadowProperty> &newValue)
std::optional<Union::Properties::ShadowProperty> shadow() const
Union::Properties::BackgroundProperty &operator=(Union::Properties::BackgroundProperty &&other)
Union::Properties::BackgroundProperty &operator=(const Union::Properties::BackgroundProperty &other)

Static Public Members

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

Detailed Description

Member Function Documentation

BackgroundProperty::BackgroundProperty()

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.

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

Copy constructor.

BackgroundProperty::BackgroundProperty(Union::Properties::BackgroundProperty &&other)

Move constructor.

std::optional<Union::Properties::BorderProperty> BackgroundProperty::border() const

Returns the value of border.

See also setBorder().

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

Returns the value of color.

See also setColor().

std::optional<Union::Properties::CornersProperty> BackgroundProperty::corners() const

Returns the value of corners.

See also setCorners().

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

Create and return an empty BackgroundProperty instance.

This will create an empty BackgroundProperty 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 BackgroundProperty::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<Union::Properties::ImageProperty> BackgroundProperty::image() const

Returns the value of image.

See also setImage().

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

Set the value of border.

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

See also border().

void BackgroundProperty::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 BackgroundProperty::setCorners(const std::optional<Union::Properties::CornersProperty> &newValue)

Set the value of corners.

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

See also corners().

void BackgroundProperty::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 BackgroundProperty::setShadow(const std::optional<Union::Properties::ShadowProperty> &newValue)

Set the value of shadow.

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

See also shadow().

std::optional<Union::Properties::ShadowProperty> BackgroundProperty::shadow() const

Returns the value of shadow.

See also setShadow().

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

Move assignment operator.

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

Copy assignment operator.

Related Non-Members

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

QDebug support for BackgroundProperty.

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

Equality comparison for BackgroundProperty.