Specifies a palette of IRC colors. More...
#include <IrcPalette>
Inherits QObject.
Public Member Functions | |
QString | black () const |
QString | blue () const |
QString | brown () const |
QString | colorName (int color, const QString &fallback=QStringLiteral("black")) const |
QMap< int, QString > | colorNames () const |
QString | cyan () const |
QString | gray () const |
QString | green () const |
QString | lightBlue () const |
QString | lightCyan () const |
QString | lightGray () const |
QString | lightGreen () const |
QString | orange () const |
QString | pink () const |
QString | purple () const |
QString | red () const |
void | setColorName (int color, const QString &name) |
void | setColorNames (const QMap< int, QString > &names) |
QString | white () const |
QString | yellow () const |
IrcPalette is used to specify the desired IRC color palette when converting IRC-style formatted messages to HTML using IrcTextFormat.
QString IrcPalette::black | ( | ) | const |
This property holds the black color name.
The default value is "black"
.
QString IrcPalette::blue | ( | ) | const |
This property holds the blue color name.
The default value is "blue"
.
QString IrcPalette::brown | ( | ) | const |
This property holds the brown color name.
The default value is "brown"
.
QString IrcPalette::colorName | ( | int | color, |
const QString & | fallback = QStringLiteral("black") |
||
) | const |
Converts a color code to a color name. If the color code is unknown, the function returns the fallback color name.
QMap< int, QString > IrcPalette::colorNames | ( | ) | const |
Returns the map of color names.
QString IrcPalette::cyan | ( | ) | const |
This property holds the cyan color name.
The default value is "cyan"
.
QString IrcPalette::gray | ( | ) | const |
This property holds the gray color name.
The default value is "gray"
.
QString IrcPalette::green | ( | ) | const |
This property holds the green color name.
The default value is "green"
.
QString IrcPalette::lightBlue | ( | ) | const |
This property holds the light blue color name.
The default value is "lightblue"
.
QString IrcPalette::lightCyan | ( | ) | const |
This property holds the light cyan color name.
The default value is "lightcyan"
.
QString IrcPalette::lightGray | ( | ) | const |
This property holds the light gray color name.
The default value is "lightgray"
.
QString IrcPalette::lightGreen | ( | ) | const |
This property holds the light green color name.
The default value is "lightgreen"
.
QString IrcPalette::orange | ( | ) | const |
This property holds the orange color name.
The default value is "orange"
.
QString IrcPalette::pink | ( | ) | const |
This property holds the pink color name.
The default value is "pink"
.
QString IrcPalette::purple | ( | ) | const |
This property holds the purple color name.
The default value is "purple"
.
QString IrcPalette::red | ( | ) | const |
This property holds the red color name.
The default value is "red"
.
void IrcPalette::setColorName | ( | int | color, |
const QString & | name | ||
) |
Assigns a name for color code.
The color name may be in one of these formats:
void IrcPalette::setColorNames | ( | const QMap< int, QString > & | names | ) |
Sets the map of color names.
QString IrcPalette::white | ( | ) | const |
This property holds the white color name.
The default value is "white"
.
QString IrcPalette::yellow | ( | ) | const |
This property holds the yellow color name.
The default value is "yellow"
.