Specifies a palette of IRC colors. More...
Inherits QObject.
Public Member Functions | |
| QString | colorName (int color, const QString &fallback=QLatin1String("black")) const |
| QMap< int, QString > | colorNames () const |
| void | setColorName (int color, const QString &name) |
| void | setColorNames (const QMap< int, QString > &names) |
Properties | |
| QString | black |
| QString | blue |
| QString | brown |
| QString | cyan |
| QString | gray |
| QString | green |
| QString | lightBlue |
| QString | lightCyan |
| QString | lightGray |
| QString | lightGreen |
| QString | orange |
| QString | pink |
| QString | purple |
| QString | red |
| QString | white |
| QString | yellow |
IrcPalette is used to specify the desired IRC color palette when converting IRC-style formatted messages to HTML using IrcTextFormat.
| QString IrcPalette::colorName | ( | int | color, |
| const QString & | fallback = QLatin1String("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.
| 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.
|
readwrite |
This property holds the black color name.
The default value is "black".
|
readwrite |
This property holds the blue color name.
The default value is "blue".
|
readwrite |
This property holds the brown color name.
The default value is "brown".
|
readwrite |
This property holds the cyan color name.
The default value is "cyan".
|
readwrite |
This property holds the gray color name.
The default value is "gray".
|
readwrite |
This property holds the green color name.
The default value is "green".
|
readwrite |
This property holds the light blue color name.
The default value is "lightblue".
|
readwrite |
This property holds the light cyan color name.
The default value is "lightcyan".
|
readwrite |
This property holds the light gray color name.
The default value is "lightgray".
|
readwrite |
This property holds the light green color name.
The default value is "lightgreen".
|
readwrite |
This property holds the orange color name.
The default value is "orange".
|
readwrite |
This property holds the pink color name.
The default value is "pink".
|
readwrite |
This property holds the purple color name.
The default value is "purple".
|
readwrite |
This property holds the red color name.
The default value is "red".
|
readwrite |
This property holds the white color name.
The default value is "white".
|
readwrite |
This property holds the yellow color name.
The default value is "yellow".
1.8.14