Union::Properties::ImageProperty Class
class Union::Properties::ImagePropertyA property group describing properties of an image. More...
| Header: | #include <ImageProperty> |
| CMake: | find_package(Union REQUIRED)target_link_libraries(mytarget PRIVATE Union::Union) |
Public Functions
| ImageProperty() | |
| ImageProperty(const Union::Properties::ImageProperty &other) | |
| ImageProperty(Union::Properties::ImageProperty &&other) | |
| std::optional<Union::Properties::ImageFlags> | flags() const |
| bool | hasAnyValue() const |
| std::optional<qreal> | height() const |
| bool | isEmpty() const |
| std::optional<Union::Color> | maskColor() const |
| void | setFlags(const std::optional<Union::Properties::ImageFlags> &newValue) |
| void | setHeight(const std::optional<qreal> &newValue) |
| void | setMaskColor(const std::optional<Union::Color> &newValue) |
| void | setSource(const std::optional<std::filesystem::path> &newValue) |
| void | setWidth(const std::optional<qreal> &newValue) |
| void | setXOffset(const std::optional<qreal> &newValue) |
| void | setYOffset(const std::optional<qreal> &newValue) |
| std::optional<std::filesystem::path> | source() const |
| QString | toString(int indentation = 0, Union::Properties::ToStringFlags flags = ToStringFlags{}) const |
| std::optional<qreal> | width() const |
| std::optional<qreal> | xOffset() const |
| std::optional<qreal> | yOffset() const |
| Union::Properties::ImageProperty & | operator=(Union::Properties::ImageProperty &&other) |
| Union::Properties::ImageProperty & | operator=(const Union::Properties::ImageProperty &other) |
Static Public Members
| std::unique_ptr<Union::Properties::ImageProperty> | empty() |
| void | resolveProperties(const Union::Properties::ImageProperty *source, Union::Properties::ImageProperty *destination) |
Related Non-Members
| QDebug | operator<<(QDebug debug, Union::Properties::ImageProperty *type) |
| bool | operator==(const Union::Properties::ImageProperty &left, const Union::Properties::ImageProperty &right) |
Detailed Description
Member Function Documentation
ImageProperty::ImageProperty()
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.
ImageProperty::ImageProperty(const Union::Properties::ImageProperty &other)
Copy constructor.
ImageProperty::ImageProperty(Union::Properties::ImageProperty &&other)
Move constructor.
[static] std::unique_ptr<Union::Properties::ImageProperty> ImageProperty::empty()
Create and return an empty ImageProperty instance.
This will create an empty ImageProperty 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.
std::optional<Union::Properties::ImageFlags> ImageProperty::flags() const
Returns the value of flags.
See also setFlags().
bool ImageProperty::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<qreal> ImageProperty::height() const
Returns the value of height.
See also setHeight().
bool ImageProperty::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<Union::Color> ImageProperty::maskColor() const
Returns the value of maskColor.
See also setMaskColor().
[static] void ImageProperty::resolveProperties(const Union::Properties::ImageProperty *source, Union::Properties::ImageProperty *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 ImageProperty::setFlags(const std::optional<Union::Properties::ImageFlags> &newValue)
Set the value of flags.
newValue The new value or std::nullopt to unset the value.
See also flags().
void ImageProperty::setHeight(const std::optional<qreal> &newValue)
Set the value of height.
newValue The new value or std::nullopt to unset the value.
See also height().
void ImageProperty::setMaskColor(const std::optional<Union::Color> &newValue)
Set the value of maskColor.
newValue The new value or std::nullopt to unset the value.
See also maskColor().
void ImageProperty::setSource(const std::optional<std::filesystem::path> &newValue)
Set the value of source.
newValue The new value or std::nullopt to unset the value.
See also source().
void ImageProperty::setWidth(const std::optional<qreal> &newValue)
Set the value of width.
newValue The new value or std::nullopt to unset the value.
See also width().
void ImageProperty::setXOffset(const std::optional<qreal> &newValue)
Set the value of xOffset.
newValue The new value or std::nullopt to unset the value.
See also xOffset().
void ImageProperty::setYOffset(const std::optional<qreal> &newValue)
Set the value of yOffset.
newValue The new value or std::nullopt to unset the value.
See also yOffset().
std::optional<std::filesystem::path> ImageProperty::source() const
Returns the value of source.
See also setSource().
QString ImageProperty::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<qreal> ImageProperty::width() const
Returns the value of width.
See also setWidth().
std::optional<qreal> ImageProperty::xOffset() const
Returns the value of xOffset.
See also setXOffset().
std::optional<qreal> ImageProperty::yOffset() const
Returns the value of yOffset.
See also setYOffset().
Union::Properties::ImageProperty &ImageProperty::operator=(Union::Properties::ImageProperty &&other)
Move assignment operator.
Union::Properties::ImageProperty &ImageProperty::operator=(const Union::Properties::ImageProperty &other)
Copy assignment operator.
Related Non-Members
QDebug operator<<(QDebug debug, Union::Properties::ImageProperty *type)
QDebug support for ImageProperty.
bool operator==(const Union::Properties::ImageProperty &left, const Union::Properties::ImageProperty &right)
Equality comparison for ImageProperty.