|
|
Class for handling Palettes.
This class makes it easy to handle palettes. A palette is a set of colors. This class can read and write palettes from and to a file.
This class uses the "GIMP" palette file format.
This class is totally unrelated to QPalette.
QStringList |
[static]
Query which KDE palettes are installed.
Returns: A list with a palette names.
|
KPalette constructor. Creates a KPalette from a file the filename is derived from the name.
Parameters:
name | The name of palette as returned by getPaletteList() |
|
KPalette copy constructor.
|
[virtual]
KPalette destructor.
KPalette& |
KPalette assignment operator
bool |
Save the palette
Returns: 'true' if successfull
QString |
Get the description of the palette.
void |
Set the description of the palette.
QString |
Get the name of the palette.
void |
Set the name of the palette.
enum |
Editable |
Returns whether the palette may be edited.
void |
Change whether the palette may be editted.
int |
Return the number of colors in the palette.
QColor |
Find color by index.
Returns: The index
-th color of the palette.
int |
Find index by color.
Returns: The index of the color in the palette or -1 if the color is not found.
QString |
Find colorname by index.
Returns: The name of the index
-th color.
Note that not all palettes have named the colors.
QString |
Find colorname by color.
Returns: The name of color according to this palette. Note that not all palettes have named the colors. Note also that each palette can give the same color a different name.
int |
Add a color.
Parameters:
newColor | The color to add. |
newColorName | The name of the color. |
Returns: The index of the added color.
int |
Change a color.
Parameters:
index | Index of the color to change |
newColor | The new color. |
newColorName | The new color name. |
Returns: The index of the new color or -1 if the color couldn't be changed.
int |
Change a color.
Parameters:
oldColor | The original color |
newColor | The new color. |
newColorName | The new color name. |
Returns: The index of the new color or -1 if the color couldn't be changed.