Union::Properties::IconProperty Class

class Union::Properties::IconProperty

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

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

Public Functions

IconProperty()
IconProperty(const Union::Properties::IconProperty &other)
IconProperty(Union::Properties::IconProperty &&other)
std::optional<Union::Properties::AlignmentProperty> alignment() const
bool hasAnyValue() const
std::optional<qreal> height() const
std::optional<QString> name() const
void setAlignment(const std::optional<Union::Properties::AlignmentProperty> &newValue)
void setHeight(const std::optional<qreal> &newValue)
void setName(const std::optional<QString> &newValue)
void setSource(const std::optional<QUrl> &newValue)
void setWidth(const std::optional<qreal> &newValue)
std::optional<QUrl> source() const
std::optional<qreal> width() const
Union::Properties::IconProperty &operator=(Union::Properties::IconProperty &&other)
Union::Properties::IconProperty &operator=(const Union::Properties::IconProperty &other)

Static Public Members

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

Detailed Description

Member Function Documentation

IconProperty::IconProperty()

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.

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

Copy constructor.

IconProperty::IconProperty(Union::Properties::IconProperty &&other)

Move constructor.

std::optional<Union::Properties::AlignmentProperty> IconProperty::alignment() const

Returns the value of alignment.

See also setAlignment().

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

Create and return an empty IconProperty instance.

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

Returns the value of height.

See also setHeight().

std::optional<QString> IconProperty::name() const

Returns the value of name.

See also setName().

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

Set the value of alignment.

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

See also alignment().

void IconProperty::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 IconProperty::setName(const std::optional<QString> &newValue)

Set the value of name.

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

See also name().

void IconProperty::setSource(const std::optional<QUrl> &newValue)

Set the value of source.

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

See also source().

void IconProperty::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<QUrl> IconProperty::source() const

Returns the value of source.

See also setSource().

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

Returns the value of width.

See also setWidth().

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

Move assignment operator.

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

Copy assignment operator.

Related Non-Members

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

QDebug support for IconProperty.

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

Equality comparison for IconProperty.