22#ifndef KDELIBS_KPALETTE_H
23#define KDELIBS_KPALETTE_H
28#include <tqstringlist.h>
29#include "tdelibs_export.h"
128 {
return mEditable; }
142 {
return (
int) mKolorList.count(); }
149 TQColor color(
int index);
157 int findColor(
const TQColor &color)
const;
166 TQString colorName(
int index);
185 int addColor(
const TQColor &newColor,
186 const TQString &newColorName = TQString::null);
197 int changeColor(
int index,
198 const TQColor &newColor,
199 const TQString &newColorName = TQString::null);
211 const TQColor &newColor,
212 const TQString &newColorName = TQString::null)
216 typedef struct { TQColor color; TQString name; } kolor;
217 TQPtrList<kolor> mKolorList;
TQColor color(int index)
Find color by index.
TQString colorName(const TQColor &color)
Find color name by color.
TQString name() const
Get the name of the palette.
bool save()
Save the palette.
void setEditable(Editable editable)
Change whether the palette may be edited.
int nrColors() const
Return the number of colors in the palette.
void setDescription(const TQString &desc)
Set the description of the palette.
int changeColor(const TQColor &oldColor, const TQColor &newColor, const TQString &newColorName=TQString::null)
Change a color.
TQString colorName(int index)
Find color name by index.
Editable editable() const
Returns whether the palette may be edited.
static TQStringList getPaletteList()
Query which KDE palettes are installed.
int findColor(const TQColor &color) const
Find index by color.
void setName(const TQString &name)
Set the name of the palette.
TQString description() const
Get the description of the palette.
int changeColor(int index, const TQColor &newColor, const TQString &newColorName=TQString::null)
Change a color.
KPalette & operator=(const KPalette &)
KPalette assignment operator.
Editable
Used to specify whether a palette may be edited.
@ Ask
Ask user before editing.
@ No
Palette may not be edited.
@ Yes
Palette may be edited.
KPalette(const TQString &name=TQString::null)
KPalette constructor.