class KColorCollection |
|
|
Class for handling color collections ("palettes"). This class makes it easy to handle color collections, sometimes referred to as "palettes". This class can read and write collections from and to a file. This class uses the "GIMP" palette file format. Author Waldo Bastian (bastian@kde.org)
|
|
KColorCollection constructor. Creates a KColorCollection from a file the filename is derived from the name. name - The name of collection as returned by installedCollections()
|
|
KColorCollection copy constructor.
|
|
Add a color. newColor - The color to add. newColorName - The name of the color, null to remove the name. Returns The index of the added color.
|
|
Change a color. index - Index of the color to change newColor - The new color. newColorName - The new color name, null to remove the name. Returns The index of the new color or -1 if the color couldn't be changed.
|
|
Change a color. oldColor - The original color newColor - The new color. newColorName - The new color name, null to remove the name. Returns The index of the new color or -1 if the color couldn't be changed.
|
|
Find color by index. index - the index of the desired color Returns The index -th color of the collection, null if not found.
|
|
Return the number of colors in the collection. Returns the number of colors
|
|
Get the description of the collection. Returns the description of the collection.
|
|
Returns whether the collection may be edited. Returns the state of the collection
|
|
Find index by color. color - the color to find Returns The index of the color in the collection or -1 if the color is not found.
|
|
Query which KDE color collections are installed. Returns A list with installed color collection names. |
|
Get the name of the collection. Returns the name of the collection
|
|
Find color name by index. index - the index of the color Returns The name of the index -th color. Note that not all collections have named the colors. Null is returned if the color does not exist or has no name.
|
|
Find color name by color. Returns The name of color according to this collection. Note that not all collections have named the colors. Note also that each collection can give the same color a different name.
|
|
KColorCollection assignment operator Save the collection Returns 'true' if successful
|
|
Set the description of the collection. desc - the new description
|
|
Change whether the collection may be edited. editable - the state of the collection
|
|
Set the name of the collection. name - the name of the collection
|
Yes | - | Collection may be edited | |
No | - | Collection may not be edited | |
Ask | - | Ask user before editing |