Union::Properties::StylePropertyGroup Class
class Union::Properties::StylePropertyGroupThe root property group for all elements. More...
| Header: | #include <StylePropertyGroup.h> |
| CMake: | find_package(Union REQUIRED)target_link_libraries(mytarget PRIVATE Union::Union) |
Public Functions
| StylePropertyGroup() | |
| StylePropertyGroup(const Union::Properties::StylePropertyGroup &other) | |
| StylePropertyGroup(Union::Properties::StylePropertyGroup &&other) | |
| Union::Properties::BackgroundPropertyGroup * | background() const |
| Union::Properties::BorderPropertyGroup * | border() const |
| Union::Properties::CornersPropertyGroup * | corners() const |
| bool | hasAnyValue() const |
| Union::Properties::IconPropertyGroup * | icon() const |
| bool | isEmpty() const |
| Union::Properties::LayoutPropertyGroup * | layout() const |
| Union::Properties::OutlinePropertyGroup * | outline() const |
| void | setBackground(std::unique_ptr<Union::Properties::BackgroundPropertyGroup> &&newValue) |
| void | setBorder(std::unique_ptr<Union::Properties::BorderPropertyGroup> &&newValue) |
| void | setCorners(std::unique_ptr<Union::Properties::CornersPropertyGroup> &&newValue) |
| void | setIcon(std::unique_ptr<Union::Properties::IconPropertyGroup> &&newValue) |
| void | setLayout(std::unique_ptr<Union::Properties::LayoutPropertyGroup> &&newValue) |
| void | setOutline(std::unique_ptr<Union::Properties::OutlinePropertyGroup> &&newValue) |
| void | setShadow(std::unique_ptr<Union::Properties::ShadowPropertyGroup> &&newValue) |
| void | setText(std::unique_ptr<Union::Properties::TextPropertyGroup> &&newValue) |
| Union::Properties::ShadowPropertyGroup * | shadow() const |
| Union::Properties::TextPropertyGroup * | text() const |
| QString | toString(int indentation = 0, Union::Properties::ToStringFlags flags = ToStringFlags{}) const |
| Union::Properties::StylePropertyGroup & | operator=(Union::Properties::StylePropertyGroup &&other) |
| Union::Properties::StylePropertyGroup & | operator=(const Union::Properties::StylePropertyGroup &other) |
Static Public Members
| std::unique_ptr<Union::Properties::StylePropertyGroup> | empty() |
| void | resolveProperties(const Union::Properties::StylePropertyGroup *source, Union::Properties::StylePropertyGroup *destination) |
Related Non-Members
| QDebug | operator<<(QDebug debug, Union::Properties::StylePropertyGroup *type) |
| bool | operator==(const Union::Properties::StylePropertyGroup &left, const Union::Properties::StylePropertyGroup &right) |
Detailed Description
This class contains all the properties that are used to style an element.
Member Function Documentation
StylePropertyGroup::StylePropertyGroup()
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.
StylePropertyGroup::StylePropertyGroup(const Union::Properties::StylePropertyGroup &other)
Copy constructor.
StylePropertyGroup::StylePropertyGroup(Union::Properties::StylePropertyGroup &&other)
Move constructor.
Union::Properties::BackgroundPropertyGroup *StylePropertyGroup::background() const
*
A property group containing properties related to an element's background.
See also setBackground().
Union::Properties::BorderPropertyGroup *StylePropertyGroup::border() const
A property group containing properties of an element's border.
See also setBorder().
Union::Properties::CornersPropertyGroup *StylePropertyGroup::corners() const
A property group containing properties of a background's corners.
See also setCorners().
[static] std::unique_ptr<Union::Properties::StylePropertyGroup> StylePropertyGroup::empty()
Create and return an empty StylePropertyGroup instance.
This will create an empty StylePropertyGroup 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 StylePropertyGroup::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.
Union::Properties::IconPropertyGroup *StylePropertyGroup::icon() const
*
A property group containing properties related to an element's icon.
See also setIcon().
bool StylePropertyGroup::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.
Union::Properties::LayoutPropertyGroup *StylePropertyGroup::layout() const
*
A property group containing properties related to the layout of an element.
See also setLayout().
Union::Properties::OutlinePropertyGroup *StylePropertyGroup::outline() const
A property group containing properties of an element's outline.
See also setOutline().
[static] void StylePropertyGroup::resolveProperties(const Union::Properties::StylePropertyGroup *source, Union::Properties::StylePropertyGroup *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 StylePropertyGroup::setBackground(std::unique_ptr<Union::Properties::BackgroundPropertyGroup> &&newValue)
Set the value of background.
newValue The new value or std::nullopt to unset the value.
See also background().
void StylePropertyGroup::setBorder(std::unique_ptr<Union::Properties::BorderPropertyGroup> &&newValue)
Set the value of border.
newValue The new value or std::nullopt to unset the value.
See also border().
void StylePropertyGroup::setCorners(std::unique_ptr<Union::Properties::CornersPropertyGroup> &&newValue)
Set the value of corners.
newValue The new value or std::nullopt to unset the value.
See also corners().
void StylePropertyGroup::setIcon(std::unique_ptr<Union::Properties::IconPropertyGroup> &&newValue)
Set the value of icon.
newValue The new value or std::nullopt to unset the value.
See also icon().
void StylePropertyGroup::setLayout(std::unique_ptr<Union::Properties::LayoutPropertyGroup> &&newValue)
Set the value of layout.
newValue The new value or std::nullopt to unset the value.
See also layout().
void StylePropertyGroup::setOutline(std::unique_ptr<Union::Properties::OutlinePropertyGroup> &&newValue)
Set the value of outline.
newValue The new value or std::nullopt to unset the value.
See also outline().
void StylePropertyGroup::setShadow(std::unique_ptr<Union::Properties::ShadowPropertyGroup> &&newValue)
Set the value of shadow.
newValue The new value or std::nullopt to unset the value.
See also shadow().
void StylePropertyGroup::setText(std::unique_ptr<Union::Properties::TextPropertyGroup> &&newValue)
Set the value of text.
newValue The new value or std::nullopt to unset the value.
See also text().
Union::Properties::ShadowPropertyGroup *StylePropertyGroup::shadow() const
A property group containing properties relating to an element's shadow.
See also setShadow().
Union::Properties::TextPropertyGroup *StylePropertyGroup::text() const
*
A property group containing properties related to the text of an element.
See also setText().
QString StylePropertyGroup::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::StylePropertyGroup &StylePropertyGroup::operator=(Union::Properties::StylePropertyGroup &&other)
Move assignment operator.
Union::Properties::StylePropertyGroup &StylePropertyGroup::operator=(const Union::Properties::StylePropertyGroup &other)
Copy assignment operator.
Related Non-Members
QDebug operator<<(QDebug debug, Union::Properties::StylePropertyGroup *type)
QDebug support for StylePropertyGroup.
bool operator==(const Union::Properties::StylePropertyGroup &left, const Union::Properties::StylePropertyGroup &right)
Equality comparison for StylePropertyGroup.