Union::Properties::ShadowProperty Class

class Union::Properties::ShadowProperty

A property group containing properties relating to an element's shadow. More...

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

Public Functions

ShadowProperty()
ShadowProperty(const Union::Properties::ShadowProperty &other)
ShadowProperty(Union::Properties::ShadowProperty &&other)
std::optional<qreal> blur() const
Union::Properties::LineProperty *bottom() const
Union::Properties::CornerProperty *bottomLeft() const
Union::Properties::CornerProperty *bottomRight() const
std::optional<Union::Color> color() const
bool hasAnyValue() const
bool isEmpty() const
Union::Properties::LineProperty *left() const
Union::Properties::OffsetProperty *offset() const
Union::Properties::LineProperty *right() const
void setBlur(const std::optional<qreal> &newValue)
void setBottom(std::unique_ptr<Union::Properties::LineProperty> &&newValue)
void setBottomLeft(std::unique_ptr<Union::Properties::CornerProperty> &&newValue)
void setBottomRight(std::unique_ptr<Union::Properties::CornerProperty> &&newValue)
void setColor(const std::optional<Union::Color> &newValue)
void setLeft(std::unique_ptr<Union::Properties::LineProperty> &&newValue)
void setOffset(std::unique_ptr<Union::Properties::OffsetProperty> &&newValue)
void setRight(std::unique_ptr<Union::Properties::LineProperty> &&newValue)
void setSize(const std::optional<qreal> &newValue)
void setTop(std::unique_ptr<Union::Properties::LineProperty> &&newValue)
void setTopLeft(std::unique_ptr<Union::Properties::CornerProperty> &&newValue)
void setTopRight(std::unique_ptr<Union::Properties::CornerProperty> &&newValue)
std::optional<qreal> size() const
QString toString(int indentation = 0, Union::Properties::ToStringFlags flags = ToStringFlags{}) const
Union::Properties::LineProperty *top() const
Union::Properties::CornerProperty *topLeft() const
Union::Properties::CornerProperty *topRight() const
Union::Properties::ShadowProperty &operator=(Union::Properties::ShadowProperty &&other)
Union::Properties::ShadowProperty &operator=(const Union::Properties::ShadowProperty &other)

Static Public Members

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

Detailed Description

Member Function Documentation

ShadowProperty::ShadowProperty()

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.

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

Copy constructor.

ShadowProperty::ShadowProperty(Union::Properties::ShadowProperty &&other)

Move constructor.

std::optional<qreal> ShadowProperty::blur() const

Returns the value of blur.

See also setBlur().

Union::Properties::LineProperty *ShadowProperty::bottom() const

Returns bottom if set or nullptr if not.

See also setBottom().

Union::Properties::CornerProperty *ShadowProperty::bottomLeft() const

Returns bottomLeft if set or nullptr if not.

See also setBottomLeft().

Union::Properties::CornerProperty *ShadowProperty::bottomRight() const

Returns bottomRight if set or nullptr if not.

See also setBottomRight().

std::optional<Union::Color> ShadowProperty::color() const

Returns the value of color.

See also setColor().

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

Create and return an empty ShadowProperty instance.

This will create an empty ShadowProperty 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 ShadowProperty::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 ShadowProperty::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.

Union::Properties::LineProperty *ShadowProperty::left() const

Returns left if set or nullptr if not.

See also setLeft().

Union::Properties::OffsetProperty *ShadowProperty::offset() const

Returns offset if set or nullptr if not.

See also setOffset().

[static] void ShadowProperty::resolveProperties(const Union::Properties::ShadowProperty *source, Union::Properties::ShadowProperty *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.

Returns right if set or nullptr if not.

See also setRight().

void ShadowProperty::setBlur(const std::optional<qreal> &newValue)

Set the value of blur.

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

See also blur().

void ShadowProperty::setBottom(std::unique_ptr<Union::Properties::LineProperty> &&newValue)

Set the value of bottom.

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

See also bottom().

void ShadowProperty::setBottomLeft(std::unique_ptr<Union::Properties::CornerProperty> &&newValue)

Set the value of bottomLeft.

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

See also bottomLeft().

void ShadowProperty::setBottomRight(std::unique_ptr<Union::Properties::CornerProperty> &&newValue)

Set the value of bottomRight.

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

See also bottomRight().

void ShadowProperty::setColor(const std::optional<Union::Color> &newValue)

Set the value of color.

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

See also color().

void ShadowProperty::setLeft(std::unique_ptr<Union::Properties::LineProperty> &&newValue)

Set the value of left.

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

See also left().

void ShadowProperty::setOffset(std::unique_ptr<Union::Properties::OffsetProperty> &&newValue)

Set the value of offset.

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

See also offset().

void ShadowProperty::setRight(std::unique_ptr<Union::Properties::LineProperty> &&newValue)

Set the value of right.

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

See also right().

void ShadowProperty::setSize(const std::optional<qreal> &newValue)

Set the value of size.

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

See also size().

void ShadowProperty::setTop(std::unique_ptr<Union::Properties::LineProperty> &&newValue)

Set the value of top.

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

See also top().

void ShadowProperty::setTopLeft(std::unique_ptr<Union::Properties::CornerProperty> &&newValue)

Set the value of topLeft.

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

See also topLeft().

void ShadowProperty::setTopRight(std::unique_ptr<Union::Properties::CornerProperty> &&newValue)

Set the value of topRight.

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

See also topRight().

std::optional<qreal> ShadowProperty::size() const

Returns the value of size.

See also setSize().

QString ShadowProperty::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::LineProperty *ShadowProperty::top() const

Returns top if set or nullptr if not.

See also setTop().

Union::Properties::CornerProperty *ShadowProperty::topLeft() const

Returns topLeft if set or nullptr if not.

See also setTopLeft().

Union::Properties::CornerProperty *ShadowProperty::topRight() const

Returns topRight if set or nullptr if not.

See also setTopRight().

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

Move assignment operator.

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

Copy assignment operator.

Related Non-Members

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

QDebug support for ShadowProperty.

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

Equality comparison for ShadowProperty.