• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Konsole

Konsole::ColorScheme

Konsole::ColorScheme Class Reference

Represents a color scheme for a terminal display. More...

#include <ColorScheme.h>

Inheritance diagram for Konsole::ColorScheme:

Inheritance graph
[legend]

List of all members.


Public Member Functions

QColor backgroundColor () const
ColorEntry colorEntry (int index, uint randomSeed=0) const
 ColorScheme (const ColorScheme &other)
 ColorScheme ()
QString description () const
QColor foregroundColor () const
void getColorTable (ColorEntry *table, uint randomSeed=0) const
bool hasDarkBackground () const
QString name () const
qreal opacity () const
bool randomizedBackgroundColor () const
void read (KConfig &config)
void setColorTableEntry (int index, const ColorEntry &entry)
void setDescription (const QString &description)
void setName (const QString &name)
void setOpacity (qreal opacity)
void setRandomizedBackgroundColor (bool randomize)
void write (KConfig &config) const
 ~ColorScheme ()

Static Public Member Functions

static QString colorNameForIndex (int index)
static QString translatedColorNameForIndex (int index)

Detailed Description

Represents a color scheme for a terminal display.

The color scheme includes the palette of colors used to draw the text and character backgrounds in the display and the opacity level of the display background.

Definition at line 47 of file ColorScheme.h.


Constructor & Destructor Documentation

ColorScheme::ColorScheme (  ) 

Constructs a new color scheme which is initialised to the default color set for Konsole.

Definition at line 115 of file ColorScheme.cpp.

ColorScheme::ColorScheme ( const ColorScheme &  other  ) 

Definition at line 121 of file ColorScheme.cpp.

ColorScheme::~ColorScheme (  ) 

Definition at line 144 of file ColorScheme.cpp.


Member Function Documentation

QColor ColorScheme::backgroundColor (  )  const

Convenience method.

Returns the background color for this scheme, this is the primary color used to draw the terminal background in this scheme.

Definition at line 252 of file ColorScheme.cpp.

ColorEntry ColorScheme::colorEntry ( int  index,
uint  randomSeed = 0 
) const

Retrieves a single color entry from the table.

See getColorTable()

Definition at line 170 of file ColorScheme.cpp.

QString ColorScheme::colorNameForIndex ( int  index  )  [static]

Definition at line 293 of file ColorScheme.cpp.

QString ColorScheme::description (  )  const

Returns the descriptive name of the color scheme.

Definition at line 151 of file ColorScheme.cpp.

QColor ColorScheme::foregroundColor (  )  const

Convenience method.

Returns the foreground color for this scheme, this is the primary color used to draw the text in this scheme.

Definition at line 248 of file ColorScheme.cpp.

void ColorScheme::getColorTable ( ColorEntry *  table,
uint  randomSeed = 0 
) const

Copies the color entries which form the palette for this color scheme into table.

table should be an array with TABLE_COLORS entries.

Parameters:
table Array into which the color entries for this color scheme are copied.
randomSeed Color schemes may allow certain colors in their palette to be randomized. The seed is used to pick the random color.

Definition at line 201 of file ColorScheme.cpp.

bool ColorScheme::hasDarkBackground (  )  const

Returns true if this color scheme has a dark background.

The background color is said to be dark if it has a value of less than 127 in the HSV color space.

Definition at line 256 of file ColorScheme.cpp.

QString ColorScheme::name (  )  const

Returns the name of the color scheme.

Definition at line 154 of file ColorScheme.cpp.

qreal ColorScheme::opacity (  )  const

Returns the opacity level for this color scheme, see setOpacity() TODO: More documentation.

Definition at line 263 of file ColorScheme.cpp.

bool ColorScheme::randomizedBackgroundColor (  )  const

Returns true if the background color is randomized.

Definition at line 206 of file ColorScheme.cpp.

void ColorScheme::read ( KConfig &  config  ) 

Reads the color scheme from the specified configuration source.

Definition at line 265 of file ColorScheme.cpp.

void ColorScheme::setColorTableEntry ( int  index,
const ColorEntry &  entry 
)

Sets a single entry within the color palette.

Definition at line 156 of file ColorScheme.cpp.

void ColorScheme::setDescription ( const QString &  description  ) 

Sets the descriptive name of the color scheme.

Definition at line 150 of file ColorScheme.cpp.

void ColorScheme::setName ( const QString &  name  ) 

Sets the name of the color scheme.

Definition at line 153 of file ColorScheme.cpp.

void ColorScheme::setOpacity ( qreal  opacity  ) 

Sets the opacity level of the display background.

opacity ranges between 0 (completely transparent background) and 1 (completely opaque background).

Defaults to 1.

TODO: More documentation

Definition at line 262 of file ColorScheme.cpp.

void ColorScheme::setRandomizedBackgroundColor ( bool  randomize  ) 

Enables randomization of the background color.

This will cause the palette returned by getColorTable() and colorEntry() to be adjusted depending on the value of the random seed argument to them.

Definition at line 210 of file ColorScheme.cpp.

QString ColorScheme::translatedColorNameForIndex ( int  index  )  [static]

Definition at line 299 of file ColorScheme.cpp.

void ColorScheme::write ( KConfig &  config  )  const

Writes the color scheme to the specified configuration source.

Definition at line 279 of file ColorScheme.cpp.


The documentation for this class was generated from the following files:
  • ColorScheme.h
  • ColorScheme.cpp

Konsole

Skip menu "Konsole"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • Konsole
  • Libraries
  •   libkonq
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal