Union::Properties Namespace
namespace Union::Properties| Header: | #include <PropertiesTypes.h> |
| CMake: | find_package(Union REQUIRED)target_link_libraries(mytarget PRIVATE Union::Union) |
Classes
| class | AlignmentPropertyGroup |
| class | BackgroundPropertyGroup |
| class | BorderPropertyGroup |
| class | CornerPropertyGroup |
| class | CornersPropertyGroup |
| class | DisplayPropertyGroup |
| class | IconPropertyGroup |
| class | ImagePropertyGroup |
| class | LayoutPropertyGroup |
| class | LinePropertyGroup |
| class | OffsetPropertyGroup |
| class | OutlinePropertyGroup |
| class | ShadowPropertyGroup |
| class | SizePropertyGroup |
| class | StylePropertyGroup |
| class | TextPropertyGroup |
Types
| enum class | Alignment { Unspecified, Start, Center, End, Fill, …, StackFill } |
| enum class | AlignmentContainer { Item, Content, Background } |
| enum class | ImageFlag { RepeatX, RepeatY, RepeatBoth, StretchX, StretchY, …, InvertedMask } |
| flags | ImageFlags |
| enum class | LineStyle { Solid } |
| enum class | TextElide { None, Left, Middle, Right } |
| enum class | TextWrapMode { NoWrap, WordWrap, ManualWrap, WrapAnywhere, WrapAtWordBoundaryOrAnywhere } |
Functions
| T | safePropertyLookup(const PropertyGroup *group, const T &defaultValue, LookupFunction function) |
| T | safePropertyLookup(const PropertyGroup *group, const T &defaultValue, LookupFunction function, LookupFunctions... functions) |
| bool | operator==(const Union::Properties::ImagePropertyGroup &left, const Union::Properties::ImagePropertyGroup &right) |
| bool | operator==(const Union::Properties::BackgroundPropertyGroup &left, const Union::Properties::BackgroundPropertyGroup &right) |
| bool | operator==(const Union::Properties::LinePropertyGroup &left, const Union::Properties::LinePropertyGroup &right) |
| bool | operator==(const Union::Properties::BorderPropertyGroup &left, const Union::Properties::BorderPropertyGroup &right) |
| bool | operator==(const Union::Properties::CornerPropertyGroup &left, const Union::Properties::CornerPropertyGroup &right) |
| bool | operator==(const Union::Properties::CornersPropertyGroup &left, const Union::Properties::CornersPropertyGroup &right) |
| bool | operator==(const Union::Properties::DisplayPropertyGroup &left, const Union::Properties::DisplayPropertyGroup &right) |
| bool | operator==(const Union::Properties::AlignmentPropertyGroup &left, const Union::Properties::AlignmentPropertyGroup &right) |
| bool | operator==(const Union::Properties::IconPropertyGroup &left, const Union::Properties::IconPropertyGroup &right) |
| bool | operator==(const Union::Properties::SizePropertyGroup &left, const Union::Properties::SizePropertyGroup &right) |
| bool | operator==(const Union::Properties::LayoutPropertyGroup &left, const Union::Properties::LayoutPropertyGroup &right) |
| bool | operator==(const Union::Properties::OutlinePropertyGroup &left, const Union::Properties::OutlinePropertyGroup &right) |
| bool | operator==(const Union::Properties::OffsetPropertyGroup &left, const Union::Properties::OffsetPropertyGroup &right) |
| bool | operator==(const Union::Properties::ShadowPropertyGroup &left, const Union::Properties::ShadowPropertyGroup &right) |
| bool | operator==(const Union::Properties::TextPropertyGroup &left, const Union::Properties::TextPropertyGroup &right) |
| bool | operator==(const Union::Properties::StylePropertyGroup &left, const Union::Properties::StylePropertyGroup &right) |
Detailed Description
Flags and enums used by property classes.
Classes
class AlignmentPropertyGroup
A property group with properties related to alignment. More...
class BackgroundPropertyGroup
A property group containing properties related to an element's background. More...
class BorderPropertyGroup
A property group containing properties of an element's border. More...
class CornerPropertyGroup
A property group containing the properties of a corner. More...
class CornersPropertyGroup
A property group containing properties of a background's corners. More...
class DisplayPropertyGroup
A property group containing properties related to how the element is displayed. More...
class IconPropertyGroup
A property group containing properties related to an element's icon. More...
class ImagePropertyGroup
A property group describing properties of an image. More...
class LayoutPropertyGroup
A property group containing properties related to the layout of an element. More...
class LinePropertyGroup
A property group containing the properties of a line. More...
class OffsetPropertyGroup
class OutlinePropertyGroup
A property group containing properties of an element's outline. More...
class ShadowPropertyGroup
A property group containing properties relating to an element's shadow. More...
class SizePropertyGroup
A property group representing a set of sizes for cardinal directions. More...
class StylePropertyGroup
The root property group for all elements. More...
class TextPropertyGroup
A property group containing properties related to the text of an element. More...
Type Documentation
enum class Properties::Alignment
enum class Properties::AlignmentContainer
enum class Properties::ImageFlag
flags Properties::ImageFlags
Flags used to indicate stretching or tiling behavior for images.
Note that Repeat and Stretch are mutually exclusive.
| Constant | Value | Description |
|---|---|---|
Union::Properties::ImageFlag::RepeatX | 1 << 0 | Repeat the image on the X axis. |
Union::Properties::ImageFlag::RepeatY | 1 << 1 | Repeat the image on the Y axis. |
Union::Properties::ImageFlag::RepeatBoth | RepeatX | RepeatY | Repeat the image on both axes. |
Union::Properties::ImageFlag::StretchX | 1 << 2 | Stretch the image on the X axis. |
Union::Properties::ImageFlag::StretchY | 1 << 3 | Stretch the image on the Y axis. |
Union::Properties::ImageFlag::StretchBoth | StretchX | StretchY | Stretch the image on both axes. |
Union::Properties::ImageFlag::Mask | 1 << 4 | Use the image as a mask. |
Union::Properties::ImageFlag::InvertedMask | 1 << 5 | Use the image as a mask, but invert the masked area. |
The ImageFlags type is a typedef for QFlags<ImageFlag>. It stores an OR combination of ImageFlag values.
enum class Properties::LineStyle
The style that should be used to render a line.
| Constant | Value | Description |
|---|---|---|
Union::Properties::LineStyle::Solid | 1 | Render as a solid, continuous line. |
enum class Properties::TextElide
enum class Properties::TextWrapMode
Function Documentation
template < typename T, typename PropertyGroup, MemberFunctionPointer LookupFunction > requires std::is_invocable_v<LookupFunction, PropertyGroup> T Properties::safePropertyLookup(const PropertyGroup *group, const T &defaultValue, LookupFunction function)
Perform safe property lookup on a property group.
This will return the value of the property that is accessed by calling function which is required to be a pointer-to-member-function of group. If the value is a pointer or std::optional<>, the value is checked to be valid before returning. If it is not, defaultValue is returned.
template < typename T, typename PropertyGroup, MemberFunctionPointer LookupFunction, MemberFunctionPointer... LookupFunctions > requires std::is_invocable_v<LookupFunction, PropertyGroup> T Properties::safePropertyLookup(const PropertyGroup *group, const T &defaultValue, LookupFunction function, LookupFunctions... functions)
Perform safe property lookup on a property group.
This will return the value of a property specified as final function of functions using function and the other entries in functions to look up property groups along the way. If any of the property groups return nullptr, defaultValue will be returned.
bool operator==(const Union::Properties::ImagePropertyGroup &left, const Union::Properties::ImagePropertyGroup &right)
Equality comparison for ImagePropertyGroup.
bool operator==(const Union::Properties::BackgroundPropertyGroup &left, const Union::Properties::BackgroundPropertyGroup &right)
Equality comparison for BackgroundPropertyGroup.
bool operator==(const Union::Properties::LinePropertyGroup &left, const Union::Properties::LinePropertyGroup &right)
Equality comparison for LinePropertyGroup.
bool operator==(const Union::Properties::BorderPropertyGroup &left, const Union::Properties::BorderPropertyGroup &right)
Equality comparison for BorderPropertyGroup.
bool operator==(const Union::Properties::CornerPropertyGroup &left, const Union::Properties::CornerPropertyGroup &right)
Equality comparison for CornerPropertyGroup.
bool operator==(const Union::Properties::CornersPropertyGroup &left, const Union::Properties::CornersPropertyGroup &right)
Equality comparison for CornersPropertyGroup.
bool operator==(const Union::Properties::DisplayPropertyGroup &left, const Union::Properties::DisplayPropertyGroup &right)
Equality comparison for DisplayPropertyGroup.
bool operator==(const Union::Properties::AlignmentPropertyGroup &left, const Union::Properties::AlignmentPropertyGroup &right)
Equality comparison for AlignmentPropertyGroup.
bool operator==(const Union::Properties::IconPropertyGroup &left, const Union::Properties::IconPropertyGroup &right)
Equality comparison for IconPropertyGroup.
bool operator==(const Union::Properties::SizePropertyGroup &left, const Union::Properties::SizePropertyGroup &right)
Equality comparison for SizePropertyGroup.
bool operator==(const Union::Properties::LayoutPropertyGroup &left, const Union::Properties::LayoutPropertyGroup &right)
Equality comparison for LayoutPropertyGroup.
bool operator==(const Union::Properties::OutlinePropertyGroup &left, const Union::Properties::OutlinePropertyGroup &right)
Equality comparison for OutlinePropertyGroup.
bool operator==(const Union::Properties::OffsetPropertyGroup &left, const Union::Properties::OffsetPropertyGroup &right)
Equality comparison for OffsetPropertyGroup.
bool operator==(const Union::Properties::ShadowPropertyGroup &left, const Union::Properties::ShadowPropertyGroup &right)
Equality comparison for ShadowPropertyGroup.
bool operator==(const Union::Properties::TextPropertyGroup &left, const Union::Properties::TextPropertyGroup &right)
Equality comparison for TextPropertyGroup.
bool operator==(const Union::Properties::StylePropertyGroup &left, const Union::Properties::StylePropertyGroup &right)
Equality comparison for StylePropertyGroup.