kstars
ColorScheme Class Reference
This class stores all of the adjustable colors in KStars, in a QMap object keyed by the names of the colors. More...
#include <colorscheme.h>
Public Member Functions | |
| QString | colorAt (int i) const |
| QString | colorNamed (const QString &name) const |
| ColorScheme (const ColorScheme &cs) | |
| ColorScheme () | |
| void | copy (const ColorScheme &cs) |
| QString | fileName () const |
| bool | hasColorNamed (const QString &name) const |
| QString | keyAt (int i) const |
| bool | load (const QString &filename) |
| void | loadFromConfig (KConfig *) |
| QString | nameAt (int i) const |
| QString | nameFromKey (const QString &key) const |
| unsigned int | numberOfColors () const |
| bool | save (const QString &name) |
| void | saveToConfig (KConfig *) |
| void | setColor (const QString &key, const QString &color) |
| void | setStarColorIntensity (int intens) |
| void | setStarColorMode (int mode) |
| int | starColorIntensity () const |
| int | starColorMode () const |
| ~ColorScheme () | |
Detailed Description
This class stores all of the adjustable colors in KStars, in a QMap object keyed by the names of the colors.It also stores information on how stars are to be rendered in the map (with realistic colors, or as solid red/whit/black circles). In addition to the brief "Key names" used to index the colors in the QMap, each color has a "long name" description that is a bit more verbose, and suitable for UI display.
- Version:
- 1.0
Definition at line 39 of file colorscheme.h.
Constructor & Destructor Documentation
| ColorScheme::ColorScheme | ( | ) |
Constructor.
Enter all adjustable colors and their default values into the QMap. Also assign the corresponding long names.
Definition at line 30 of file colorscheme.cpp.
| ColorScheme::ColorScheme | ( | const ColorScheme & | cs | ) |
| ColorScheme::~ColorScheme | ( | ) |
Member Function Documentation
| QString ColorScheme::colorAt | ( | int | i | ) | const |
i the index of the color to retrieve
- Returns:
- a color by its index in the QMap
Definition at line 155 of file colorscheme.cpp.
Retrieve a color by name.
name the key name of the color to be retrieved.
- Returns:
- the requested color, or "#FFFFFF" (white) if color name not found.
Definition at line 144 of file colorscheme.cpp.
| void ColorScheme::copy | ( | const ColorScheme & | cs | ) |
Copy a color scheme cs the color scheme to be copied into this object.
Definition at line 134 of file colorscheme.cpp.
| QString ColorScheme::fileName | ( | ) | const [inline] |
- Returns:
- the Filename associated with the color scheme.
Definition at line 108 of file colorscheme.h.
| bool ColorScheme::hasColorNamed | ( | const QString & | name | ) | const [inline] |
- Returns:
- true if the Palette contains the given key name
Definition at line 58 of file colorscheme.h.
| QString ColorScheme::keyAt | ( | int | i | ) | const |
i the index of the key name to retrieve
- Returns:
- the key name of the color at index i
Definition at line 165 of file colorscheme.cpp.
| bool ColorScheme::load | ( | const QString & | filename | ) |
Load a color scheme from a *.colors file filename the filename of the color scheme to be loaded.
- Returns:
- TRUE if the scheme was successfully loaded
Definition at line 179 of file colorscheme.cpp.
| void ColorScheme::loadFromConfig | ( | KConfig * | conf | ) |
| QString ColorScheme::nameAt | ( | int | i | ) | const |
i the index of the long name to retrieve
- Returns:
- the name of the color at index i
Definition at line 160 of file colorscheme.cpp.
- Returns:
- the long name of the color whose key name is given
keythe key name identifying the color.
Definition at line 170 of file colorscheme.cpp.
| unsigned int ColorScheme::numberOfColors | ( | ) | const [inline] |
| bool ColorScheme::save | ( | const QString & | name | ) |
Save the current color scheme to a *.colors file.
name the filename to create
- Returns:
- TRUE if the color scheme is successfully writeen to a file
Definition at line 243 of file colorscheme.cpp.
| void ColorScheme::saveToConfig | ( | KConfig * | conf | ) |
Change the color with the given key to the given value key the key-name of the color to be changed color the new color value.
Definition at line 174 of file colorscheme.cpp.
| void ColorScheme::setStarColorIntensity | ( | int | intens | ) | [inline] |
Set the star color intensity value used by the color scheme.
Definition at line 136 of file colorscheme.h.
| void ColorScheme::setStarColorMode | ( | int | mode | ) | [inline] |
| int ColorScheme::starColorIntensity | ( | ) | const [inline] |
- Returns:
- the star color intensity value used by the color scheme
Definition at line 130 of file colorscheme.h.
| int ColorScheme::starColorMode | ( | ) | const [inline] |
The documentation for this class was generated from the following files:
KDE 3.5 API Reference