Union::Properties::AlignmentProperty Class

class Union::Properties::AlignmentProperty

A property group with properties related to alignment. More...

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

Public Functions

AlignmentProperty()
AlignmentProperty(const Union::Properties::AlignmentProperty &other)
AlignmentProperty(Union::Properties::AlignmentProperty &&other)
std::optional<Union::Properties::AlignmentContainer> container() const
bool hasAnyValue() const
std::optional<Union::Properties::Alignment> horizontal() const
std::optional<int> order() const
void setContainer(const std::optional<Union::Properties::AlignmentContainer> &newValue)
void setHorizontal(const std::optional<Union::Properties::Alignment> &newValue)
void setOrder(const std::optional<int> &newValue)
void setVertical(const std::optional<Union::Properties::Alignment> &newValue)
std::optional<Union::Properties::Alignment> vertical() const
Union::Properties::AlignmentProperty &operator=(Union::Properties::AlignmentProperty &&other)
Union::Properties::AlignmentProperty &operator=(const Union::Properties::AlignmentProperty &other)

Static Public Members

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

Detailed Description

Member Function Documentation

AlignmentProperty::AlignmentProperty()

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.

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

Copy constructor.

AlignmentProperty::AlignmentProperty(Union::Properties::AlignmentProperty &&other)

Move constructor.

std::optional<Union::Properties::AlignmentContainer> AlignmentProperty::container() const

Returns the value of container.

See also setContainer().

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

Create and return an empty AlignmentProperty instance.

This will create an empty AlignmentProperty 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 AlignmentProperty::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::Alignment> AlignmentProperty::horizontal() const

Returns the value of horizontal.

See also setHorizontal().

std::optional<int> AlignmentProperty::order() const

Returns the value of order.

See also setOrder().

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

Set the value of container.

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

See also container().

void AlignmentProperty::setHorizontal(const std::optional<Union::Properties::Alignment> &newValue)

Set the value of horizontal.

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

See also horizontal().

void AlignmentProperty::setOrder(const std::optional<int> &newValue)

Set the value of order.

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

See also order().

void AlignmentProperty::setVertical(const std::optional<Union::Properties::Alignment> &newValue)

Set the value of vertical.

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

See also vertical().

std::optional<Union::Properties::Alignment> AlignmentProperty::vertical() const

Returns the value of vertical.

See also setVertical().

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

Move assignment operator.

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

Copy assignment operator.

Related Non-Members

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

QDebug support for AlignmentProperty.

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

Equality comparison for AlignmentProperty.