Union::Properties::LinePropertyGroup Class
class Union::Properties::LinePropertyGroupA property group containing the properties of a line. More...
| Header: | #include <LinePropertyGroup.h> |
| CMake: | find_package(Union REQUIRED)target_link_libraries(mytarget PRIVATE Union::Union) |
Public Functions
| LinePropertyGroup() | |
| LinePropertyGroup(const Union::Properties::LinePropertyGroup &other) | |
| LinePropertyGroup(Union::Properties::LinePropertyGroup &&other) | |
| std::optional<Union::Color> | color() const |
| bool | hasAnyValue() const |
| bool | isEmpty() const |
| void | setColor(const std::optional<Union::Color> &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 |
| QString | toString(int indentation = 0, Union::Properties::ToStringFlags flags = ToStringFlags{}) const |
| Union::Properties::LinePropertyGroup & | operator=(Union::Properties::LinePropertyGroup &&other) |
| Union::Properties::LinePropertyGroup & | operator=(const Union::Properties::LinePropertyGroup &other) |
Static Public Members
| std::unique_ptr<Union::Properties::LinePropertyGroup> | empty() |
| void | resolveProperties(const Union::Properties::LinePropertyGroup *source, Union::Properties::LinePropertyGroup *destination) |
Related Non-Members
| QDebug | operator<<(QDebug debug, Union::Properties::LinePropertyGroup *type) |
| bool | operator==(const Union::Properties::LinePropertyGroup &left, const Union::Properties::LinePropertyGroup &right) |
Detailed Description
Member Function Documentation
LinePropertyGroup::LinePropertyGroup()
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.
LinePropertyGroup::LinePropertyGroup(const Union::Properties::LinePropertyGroup &other)
Copy constructor.
LinePropertyGroup::LinePropertyGroup(Union::Properties::LinePropertyGroup &&other)
Move constructor.
std::optional<Union::Color> LinePropertyGroup::color() const
The color of the line.
See also setColor().
[static] std::unique_ptr<Union::Properties::LinePropertyGroup> LinePropertyGroup::empty()
Create and return an empty LinePropertyGroup instance.
This will create an empty LinePropertyGroup 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 LinePropertyGroup::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 LinePropertyGroup::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.
[static] void LinePropertyGroup::resolveProperties(const Union::Properties::LinePropertyGroup *source, Union::Properties::LinePropertyGroup *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 LinePropertyGroup::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 LinePropertyGroup::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 LinePropertyGroup::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> LinePropertyGroup::size() const
The thickness of the line.
See also setSize().
std::optional<Union::Properties::LineStyle> LinePropertyGroup::style() const
The style of the line.
See also setStyle().
QString LinePropertyGroup::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::LinePropertyGroup &LinePropertyGroup::operator=(Union::Properties::LinePropertyGroup &&other)
Move assignment operator.
Union::Properties::LinePropertyGroup &LinePropertyGroup::operator=(const Union::Properties::LinePropertyGroup &other)
Copy assignment operator.
Related Non-Members
QDebug operator<<(QDebug debug, Union::Properties::LinePropertyGroup *type)
QDebug support for LinePropertyGroup.
bool operator==(const Union::Properties::LinePropertyGroup &left, const Union::Properties::LinePropertyGroup &right)
Equality comparison for LinePropertyGroup.