QPalette subclass adding named presets, string lookups, and QVariant serialization.
More...
#include <palette.h>
|
| | Palette () |
| | Default constructor.
|
| |
| | Palette (const QColor &button) |
| | Construct from a button colour.
|
| |
| | Palette (Qt::GlobalColor button) |
| | Construct from a global colour for the button role.
|
| |
| | Palette (const QColor &button, const QColor &window) |
| | Construct from button and window colours.
|
| |
| | Palette (const QBrush &windowText, const QBrush &button, const QBrush &light, const QBrush &dark, const QBrush &mid, const QBrush &text, const QBrush &bright_text, const QBrush &base, const QBrush &window) |
| | Construct from individual brush values for each role.
|
| |
| | Palette (const QColor &windowText, const QColor &window, const QColor &light, const QColor &dark, const QColor &mid, const QColor &text, const QColor &base) |
| | Construct from individual colour values for each role.
|
| |
| | Palette (const QPalette &palette) |
| | Copy-construct from a QPalette.
|
| |
| QVariant | toVariant () const |
| | Wrap this palette in a QVariant.
|
| |
QPalette subclass adding named presets, string lookups, and QVariant serialization.
Palette forwards all QPalette constructors and adds:
Definition at line 17 of file palette.h.
◆ Palette() [1/7]
Default constructor.
Definition at line 21 of file palette.h.
◆ Palette() [2/7]
| Palette::Palette |
( |
const QColor & |
button | ) |
|
|
inline |
Construct from a button colour.
- Parameters
-
Definition at line 27 of file palette.h.
◆ Palette() [3/7]
| Palette::Palette |
( |
Qt::GlobalColor |
button | ) |
|
|
inline |
Construct from a global colour for the button role.
- Parameters
-
| button | Global colour constant |
Definition at line 33 of file palette.h.
◆ Palette() [4/7]
| Palette::Palette |
( |
const QColor & |
button, |
|
|
const QColor & |
window |
|
) |
| |
|
inline |
Construct from button and window colours.
- Parameters
-
| button | Button role colour |
| window | Window role colour |
Definition at line 40 of file palette.h.
◆ Palette() [5/7]
| Palette::Palette |
( |
const QBrush & |
windowText, |
|
|
const QBrush & |
button, |
|
|
const QBrush & |
light, |
|
|
const QBrush & |
dark, |
|
|
const QBrush & |
mid, |
|
|
const QBrush & |
text, |
|
|
const QBrush & |
bright_text, |
|
|
const QBrush & |
base, |
|
|
const QBrush & |
window |
|
) |
| |
|
inline |
Construct from individual brush values for each role.
- Parameters
-
| windowText | WindowText brush |
| button | Button brush |
| light | Light brush |
| dark | Dark brush |
| mid | Mid brush |
| text | Text brush |
| bright_text | BrightText brush |
| base | Base brush |
| window | Window brush |
Definition at line 54 of file palette.h.
◆ Palette() [6/7]
| Palette::Palette |
( |
const QColor & |
windowText, |
|
|
const QColor & |
window, |
|
|
const QColor & |
light, |
|
|
const QColor & |
dark, |
|
|
const QColor & |
mid, |
|
|
const QColor & |
text, |
|
|
const QColor & |
base |
|
) |
| |
|
inline |
Construct from individual colour values for each role.
- Parameters
-
| windowText | WindowText colour |
| window | Window colour |
| light | Light colour |
| dark | Dark colour |
| mid | Mid colour |
| text | Text colour |
| base | Base colour |
Definition at line 68 of file palette.h.
◆ Palette() [7/7]
| Palette::Palette |
( |
const QPalette & |
palette | ) |
|
|
inline |
Copy-construct from a QPalette.
- Parameters
-
Definition at line 75 of file palette.h.
◆ debugDumpPalette()
| static void Palette::debugDumpPalette |
( |
const Palette & |
palette | ) |
|
|
static |
Print all colour roles and their values to debug output.
- Parameters
-
◆ fromVariant()
| static Palette Palette::fromVariant |
( |
const QVariant & |
value | ) |
|
|
inlinestatic |
◆ fusionDark()
| static Palette Palette::fusionDark |
( |
| ) |
|
|
static |
Return a dark Fusion-style palette.
- Returns
- Fusion dark palette
◆ fusionLight()
| static Palette Palette::fusionLight |
( |
| ) |
|
|
static |
Return a light Fusion-style palette.
- Returns
- Fusion light palette
◆ getColorRole()
| static ColorRole Palette::getColorRole |
( |
const QString & |
value | ) |
|
|
inlinestatic |
Look up a colour role by its string name.
- Parameters
-
| value | Colour role name string |
- Returns
- Matching QPalette::ColorRole, or NoRole if not found
Definition at line 130 of file palette.h.
◆ getColorRoleString()
| static QString Palette::getColorRoleString |
( |
ColorRole |
role | ) |
|
|
inlinestatic |
Return the string name for a colour role.
- Parameters
-
- Returns
- String name, or empty string if unknown
Definition at line 117 of file palette.h.
◆ getColorRoleStrings()
| static QStringList Palette::getColorRoleStrings |
( |
| ) |
|
|
inlinestatic |
Return all registered colour role name strings.
- Returns
- List of colour role names
Definition at line 123 of file palette.h.
◆ toVariant()
| QVariant Palette::toVariant |
( |
| ) |
const |
|
inline |
Wrap this palette in a QVariant.
- Returns
- QVariant containing a copy of this Palette
Definition at line 82 of file palette.h.
The documentation for this class was generated from the following file: