Konsole::ColorEntry

Search for usage in LXR

#include <CharacterColor.h>

Public Types

enum  FontWeight { Bold , Normal , UseCurrentFormat }
 

Public Member Functions

 ColorEntry ()
 
constexpr ColorEntry (QColor c, bool tr, FontWeight weight=UseCurrentFormat)
 

Public Attributes

QColor color
 
FontWeight fontWeight
 
bool transparent
 

Detailed Description

An entry in a terminal display's color palette.

A color palette is an array of 16 ColorEntry instances which map system color indexes (from 0 to 15) into actual colors.

Each entry can be set as bold, in which case any text drawn using the color should be drawn in bold.

Each entry can also be transparent, in which case the terminal display should avoid drawing the background for any characters using the entry as a background.

Definition at line 46 of file CharacterColor.h.

Member Enumeration Documentation

◆ FontWeight

Specifies the weight to use when drawing text with this color.

Enumerator
Bold 

Always draw text in this color with a bold weight.

Normal 

Always draw text in this color with a normal weight.

UseCurrentFormat 

Use the current font weight set by the terminal application.

This is the default behavior.

Definition at line 50 of file CharacterColor.h.

Constructor & Destructor Documentation

◆ ColorEntry() [1/2]

Konsole::ColorEntry::ColorEntry ( QColor c,
bool tr,
FontWeight weight = UseCurrentFormat )
inlineconstexpr

Constructs a new color palette entry.

Parameters
cThe color value for this entry.
trSpecifies that the color should be transparent when used as a background color.
weightSpecifies the font weight to use when drawing text with this color.

Definition at line 69 of file CharacterColor.h.

◆ ColorEntry() [2/2]

Konsole::ColorEntry::ColorEntry ( )
inline

Constructs a new color palette entry with an undefined color, and with the transparent and bold flags set to false.

Definition at line 80 of file CharacterColor.h.

Member Data Documentation

◆ color

QColor Konsole::ColorEntry::color

The color value of this entry for display.

Definition at line 87 of file CharacterColor.h.

◆ fontWeight

FontWeight Konsole::ColorEntry::fontWeight

Specifies the font weight to use when drawing text with this color.

This is not applicable when the color is used to draw a character's background.

Definition at line 98 of file CharacterColor.h.

◆ transparent

bool Konsole::ColorEntry::transparent

If true character backgrounds using this color should be transparent.

This is not applicable when the color is used to render text.

Definition at line 93 of file CharacterColor.h.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:55:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.