Describes the color of a single character in the terminal. More...
#include "CharacterColor.h"
Public Member Functions | |
CharacterColor () | |
Constructs a new CharacterColor whoose color and color space are undefined. More... | |
CharacterColor (quint8 colorSpace, int co) | |
Constructs a new CharacterColor using the specified colorSpace and with color value co . More... | |
QColor | color (const ColorEntry *palette) const |
Returns the color within the specified color @palette. More... | |
bool | isValid () |
Returns true if this character color entry is valid. More... | |
void | toggleIntensive () |
Toggles the value of this color between a normal system color and the corresponding intensive system color. More... | |
Private Attributes | |
quint8 | _colorSpace |
quint8 | _u |
quint8 | _v |
quint8 | _w |
Friends | |
class | Character |
bool | operator!= (const CharacterColor &a, const CharacterColor &b) |
Compares two colors and returns true if they represent different color values or use different color spaces. More... | |
bool | operator== (const CharacterColor &a, const CharacterColor &b) |
Compares two colors and returns true if they represent the same color value and use the same color space. More... | |
Describes the color of a single character in the terminal.
Definition at line 143 of file CharacterColor.h.
|
inline |
Constructs a new CharacterColor whoose color and color space are undefined.
Definition at line 149 of file CharacterColor.h.
|
inline |
Constructs a new CharacterColor using the specified colorSpace
and with color value co
.
The meaning of co
depends on the colorSpace
used.
TODO : Document how co
relates to colorSpace
TODO : Add documentation about available color spaces.
Definition at line 166 of file CharacterColor.h.
References _colorSpace, _u, _v, _w, COLOR_SPACE_256, COLOR_SPACE_DEFAULT, COLOR_SPACE_RGB, COLOR_SPACE_SYSTEM, and COLOR_SPACE_UNDEFINED.
|
inline |
Returns the color within the specified color @palette.
The palette
is only used if this color is one of the 16 system colors, otherwise it is ignored.
Definition at line 267 of file CharacterColor.h.
References _colorSpace, _u, _v, _w, BASE_COLORS, color256(), COLOR_SPACE_256, COLOR_SPACE_DEFAULT, COLOR_SPACE_RGB, COLOR_SPACE_SYSTEM, and COLOR_SPACE_UNDEFINED.
Referenced by HTMLDecoder::decodeLine(), TerminalView::drawCharacters(), TerminalView::drawTextFragment(), and TerminalView::paintFilters().
|
inline |
Returns true if this character color entry is valid.
Definition at line 197 of file CharacterColor.h.
References _colorSpace, and COLOR_SPACE_UNDEFINED.
Referenced by Screen::setBackColor(), and Screen::setForeColor().
|
inline |
Toggles the value of this color between a normal system color and the corresponding intensive system color.
This is only applicable if the color is using the COLOR_SPACE_DEFAULT or COLOR_SPACE_SYSTEM color spaces.
Definition at line 283 of file CharacterColor.h.
References _colorSpace, _v, COLOR_SPACE_DEFAULT, and COLOR_SPACE_SYSTEM.
Referenced by Screen::effectiveRendition().
|
friend |
Definition at line 145 of file CharacterColor.h.
|
friend |
Compares two colors and returns true if they represent different color values or use different color spaces.
Definition at line 247 of file CharacterColor.h.
|
friend |
Compares two colors and returns true if they represent the same color value and use the same color space.
Definition at line 239 of file CharacterColor.h.
|
private |
Definition at line 231 of file CharacterColor.h.
Referenced by CharacterColor(), color(), Character::isBold(), Character::isTransparent(), isValid(), and toggleIntensive().
|
private |
Definition at line 234 of file CharacterColor.h.
Referenced by CharacterColor(), color(), Character::isBold(), and Character::isTransparent().
|
private |
Definition at line 235 of file CharacterColor.h.
Referenced by CharacterColor(), color(), Character::isBold(), Character::isTransparent(), and toggleIntensive().
|
private |
Definition at line 236 of file CharacterColor.h.
Referenced by CharacterColor(), and color().