Union::Properties::LineProperty Class

class Union::Properties::LineProperty

A property group containing the properties of a line. More...

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

Public Functions

LineProperty()
LineProperty(const Union::Properties::LineProperty &other)
LineProperty(Union::Properties::LineProperty &&other)
std::optional<QColor> color() const
bool hasAnyValue() const
std::optional<Union::Properties::ImageProperty> image() const
void setColor(const std::optional<QColor> &newValue)
void setImage(const std::optional<Union::Properties::ImageProperty> &newValue)
void setSize(const std::optional<qreal> &newValue)
void setStyle(const std::optional<Union::Properties::LineStyle> &newValue)
std::optional<qreal> size() const
std::optional<Union::Properties::LineStyle> style() const
Union::Properties::LineProperty &operator=(Union::Properties::LineProperty &&other)
Union::Properties::LineProperty &operator=(const Union::Properties::LineProperty &other)

Static Public Members

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

Detailed Description

Member Function Documentation

LineProperty::LineProperty()

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.

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

Copy constructor.

LineProperty::LineProperty(Union::Properties::LineProperty &&other)

Move constructor.

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

Returns the value of color.

See also setColor().

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

Create and return an empty LineProperty instance.

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

Returns the value of image.

See also setImage().

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

Set the value of style.

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

See also style().

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

Returns the value of size.

See also setSize().

std::optional<Union::Properties::LineStyle> LineProperty::style() const

Returns the value of style.

See also setStyle().

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

Move assignment operator.

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

Copy assignment operator.

Related Non-Members

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

QDebug support for LineProperty.

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

Equality comparison for LineProperty.