Union::Properties::PaletteProperty Class

class Union::Properties::PaletteProperty

A collection of colors to be used for coloring an element. More...

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

Public Functions

PaletteProperty()
PaletteProperty(const Union::Properties::PaletteProperty &other)
PaletteProperty(Union::Properties::PaletteProperty &&other)
std::optional<QColor> accent() const
std::optional<QColor> alternateBase() const
std::optional<QColor> base() const
std::optional<QColor> brightText() const
std::optional<QColor> button() const
std::optional<QColor> buttonText() const
std::optional<QColor> dark() const
bool hasAnyValue() const
std::optional<QColor> highlight() const
std::optional<QColor> highlightedText() const
std::optional<QColor> light() const
std::optional<QColor> link() const
std::optional<QColor> linkVisited() const
std::optional<QColor> mid() const
std::optional<QColor> midlight() const
std::optional<QColor> negative() const
std::optional<QColor> neutral() const
std::optional<QColor> placeholderText() const
std::optional<QColor> positive() const
void setAccent(const std::optional<QColor> &newValue)
void setAlternateBase(const std::optional<QColor> &newValue)
void setBase(const std::optional<QColor> &newValue)
void setBrightText(const std::optional<QColor> &newValue)
void setButton(const std::optional<QColor> &newValue)
void setButtonText(const std::optional<QColor> &newValue)
void setDark(const std::optional<QColor> &newValue)
void setHighlight(const std::optional<QColor> &newValue)
void setHighlightedText(const std::optional<QColor> &newValue)
void setLight(const std::optional<QColor> &newValue)
void setLink(const std::optional<QColor> &newValue)
void setLinkVisited(const std::optional<QColor> &newValue)
void setMid(const std::optional<QColor> &newValue)
void setMidlight(const std::optional<QColor> &newValue)
void setNegative(const std::optional<QColor> &newValue)
void setNeutral(const std::optional<QColor> &newValue)
void setPlaceholderText(const std::optional<QColor> &newValue)
void setPositive(const std::optional<QColor> &newValue)
void setShadow(const std::optional<QColor> &newValue)
void setText(const std::optional<QColor> &newValue)
void setToolTipBase(const std::optional<QColor> &newValue)
void setToolTipText(const std::optional<QColor> &newValue)
void setWindow(const std::optional<QColor> &newValue)
void setWindowText(const std::optional<QColor> &newValue)
std::optional<QColor> shadow() const
std::optional<QColor> text() const
std::optional<QColor> toolTipBase() const
std::optional<QColor> toolTipText() const
std::optional<QColor> window() const
std::optional<QColor> windowText() const
Union::Properties::PaletteProperty &operator=(Union::Properties::PaletteProperty &&other)
Union::Properties::PaletteProperty &operator=(const Union::Properties::PaletteProperty &other)

Static Public Members

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

Detailed Description

Member Function Documentation

PaletteProperty::PaletteProperty()

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.

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

Copy constructor.

PaletteProperty::PaletteProperty(Union::Properties::PaletteProperty &&other)

Move constructor.

std::optional<QColor> PaletteProperty::accent() const

Returns the value of accent.

See also setAccent().

std::optional<QColor> PaletteProperty::alternateBase() const

Returns the value of alternateBase.

See also setAlternateBase().

std::optional<QColor> PaletteProperty::base() const

Returns the value of base.

See also setBase().

std::optional<QColor> PaletteProperty::brightText() const

Returns the value of brightText.

See also setBrightText().

std::optional<QColor> PaletteProperty::button() const

Returns the value of button.

See also setButton().

std::optional<QColor> PaletteProperty::buttonText() const

Returns the value of buttonText.

See also setButtonText().

std::optional<QColor> PaletteProperty::dark() const

Returns the value of dark.

See also setDark().

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

Create and return an empty PaletteProperty instance.

This will create an empty PaletteProperty 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 PaletteProperty::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<QColor> PaletteProperty::highlight() const

Returns the value of highlight.

See also setHighlight().

std::optional<QColor> PaletteProperty::highlightedText() const

Returns the value of highlightedText.

See also setHighlightedText().

std::optional<QColor> PaletteProperty::light() const

Returns the value of light.

See also setLight().

Returns the value of link.

See also setLink().

std::optional<QColor> PaletteProperty::linkVisited() const

Returns the value of linkVisited.

See also setLinkVisited().

std::optional<QColor> PaletteProperty::mid() const

Returns the value of mid.

See also setMid().

std::optional<QColor> PaletteProperty::midlight() const

Returns the value of midlight.

See also setMidlight().

std::optional<QColor> PaletteProperty::negative() const

Returns the value of negative.

See also setNegative().

std::optional<QColor> PaletteProperty::neutral() const

Returns the value of neutral.

See also setNeutral().

std::optional<QColor> PaletteProperty::placeholderText() const

Returns the value of placeholderText.

See also setPlaceholderText().

std::optional<QColor> PaletteProperty::positive() const

Returns the value of positive.

See also setPositive().

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

Set the value of accent.

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

See also accent().

void PaletteProperty::setAlternateBase(const std::optional<QColor> &newValue)

Set the value of alternateBase.

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

See also alternateBase().

void PaletteProperty::setBase(const std::optional<QColor> &newValue)

Set the value of base.

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

See also base().

void PaletteProperty::setBrightText(const std::optional<QColor> &newValue)

Set the value of brightText.

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

See also brightText().

void PaletteProperty::setButton(const std::optional<QColor> &newValue)

Set the value of button.

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

See also button().

void PaletteProperty::setButtonText(const std::optional<QColor> &newValue)

Set the value of buttonText.

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

See also buttonText().

void PaletteProperty::setDark(const std::optional<QColor> &newValue)

Set the value of dark.

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

See also dark().

void PaletteProperty::setHighlight(const std::optional<QColor> &newValue)

Set the value of highlight.

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

See also highlight().

void PaletteProperty::setHighlightedText(const std::optional<QColor> &newValue)

Set the value of highlightedText.

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

See also highlightedText().

void PaletteProperty::setLight(const std::optional<QColor> &newValue)

Set the value of light.

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

See also light().

Set the value of link.

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

See also link().

void PaletteProperty::setLinkVisited(const std::optional<QColor> &newValue)

Set the value of linkVisited.

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

See also linkVisited().

void PaletteProperty::setMid(const std::optional<QColor> &newValue)

Set the value of mid.

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

See also mid().

void PaletteProperty::setMidlight(const std::optional<QColor> &newValue)

Set the value of midlight.

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

See also midlight().

void PaletteProperty::setNegative(const std::optional<QColor> &newValue)

Set the value of negative.

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

See also negative().

void PaletteProperty::setNeutral(const std::optional<QColor> &newValue)

Set the value of neutral.

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

See also neutral().

void PaletteProperty::setPlaceholderText(const std::optional<QColor> &newValue)

Set the value of placeholderText.

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

See also placeholderText().

void PaletteProperty::setPositive(const std::optional<QColor> &newValue)

Set the value of positive.

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

See also positive().

void PaletteProperty::setShadow(const std::optional<QColor> &newValue)

Set the value of shadow.

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

See also shadow().

void PaletteProperty::setText(const std::optional<QColor> &newValue)

Set the value of text.

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

See also text().

void PaletteProperty::setToolTipBase(const std::optional<QColor> &newValue)

Set the value of toolTipBase.

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

See also toolTipBase().

void PaletteProperty::setToolTipText(const std::optional<QColor> &newValue)

Set the value of toolTipText.

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

See also toolTipText().

void PaletteProperty::setWindow(const std::optional<QColor> &newValue)

Set the value of window.

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

See also window().

void PaletteProperty::setWindowText(const std::optional<QColor> &newValue)

Set the value of windowText.

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

See also windowText().

std::optional<QColor> PaletteProperty::shadow() const

Returns the value of shadow.

See also setShadow().

std::optional<QColor> PaletteProperty::text() const

Returns the value of text.

See also setText().

std::optional<QColor> PaletteProperty::toolTipBase() const

Returns the value of toolTipBase.

See also setToolTipBase().

std::optional<QColor> PaletteProperty::toolTipText() const

Returns the value of toolTipText.

See also setToolTipText().

std::optional<QColor> PaletteProperty::window() const

Returns the value of window.

See also setWindow().

std::optional<QColor> PaletteProperty::windowText() const

Returns the value of windowText.

See also setWindowText().

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

Move assignment operator.

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

Copy assignment operator.

Related Non-Members

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

QDebug support for PaletteProperty.

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

Equality comparison for PaletteProperty.