Union::Properties::AlignmentPropertyGroup Class

class Union::Properties::AlignmentPropertyGroup

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

Header: #include <AlignmentPropertyGroup.h>
CMake: find_package(Union REQUIRED)
target_link_libraries(mytarget PRIVATE Union::Union)

Public Functions

AlignmentPropertyGroup()
AlignmentPropertyGroup(const Union::Properties::AlignmentPropertyGroup &other)
AlignmentPropertyGroup(Union::Properties::AlignmentPropertyGroup &&other)
std::optional<Union::Properties::AlignmentContainer> container() const
bool hasAnyValue() const
std::optional<Union::Properties::Alignment> horizontal() const
bool isEmpty() 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)
QString toString(int indentation = 0, Union::Properties::ToStringFlags flags = ToStringFlags{}) const
std::optional<Union::Properties::Alignment> vertical() const
Union::Properties::AlignmentPropertyGroup &operator=(Union::Properties::AlignmentPropertyGroup &&other)
Union::Properties::AlignmentPropertyGroup &operator=(const Union::Properties::AlignmentPropertyGroup &other)

Static Public Members

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

Detailed Description

Member Function Documentation

AlignmentPropertyGroup::AlignmentPropertyGroup()

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.

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

Copy constructor.

AlignmentPropertyGroup::AlignmentPropertyGroup(Union::Properties::AlignmentPropertyGroup &&other)

Move constructor.

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

The alignment container. This determines relative to what the element is placed.

See also setContainer().

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

Create and return an empty AlignmentPropertyGroup instance.

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

The horizontal alignment.

See also setHorizontal().

bool AlignmentPropertyGroup::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.

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

The order determines which elements come before others in the same alignment group.

See also setOrder().

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

QString AlignmentPropertyGroup::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.

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

The vertical alignment.

See also setVertical().

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

Move assignment operator.

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

Copy assignment operator.

Related Non-Members

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

QDebug support for AlignmentPropertyGroup.

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

Equality comparison for AlignmentPropertyGroup.