9#ifndef KDELIBS_KCOLORCOLLECTION_H
10#define KDELIBS_KCOLORCOLLECTION_H
12#include <kguiaddons_export.h>
15#include <QSharedDataPointer>
154 QString
name(
const QColor &color)
const;
163 int addColor(
const QColor &newColor,
const QString &newColorName = QString());
174 int changeColor(
int index,
const QColor &newColor,
const QString &newColorName = QString());
185 int changeColor(
const QColor &oldColor,
const QColor &newColor,
const QString &newColorName = QString());
188 QSharedDataPointer<class KColorCollectionPrivate> d;
Class for handling color collections ("palettes").
Definition kcolorcollection.h:32
int count() const
Return the number of colors in the collection.
int changeColor(const QColor &oldColor, const QColor &newColor, const QString &newColorName=QString())
Change a color.
KColorCollection & operator=(const KColorCollection &)
KColorCollection assignment operator.
void setName(const QString &name)
Set the name of the collection.
QString name() const
Get the name of the collection.
static QStringList installedCollections()
Query which KDE color collections are installed.
QString name(const QColor &color) const
Find color name by color.
Editable editable() const
Returns whether the collection may be edited.
int changeColor(int index, const QColor &newColor, const QString &newColorName=QString())
Change a color.
QString name(int index) const
Find color name by index.
void setDescription(const QString &desc)
Set the description of the collection.
~KColorCollection()
KColorCollection destructor.
QString description() const
Get the description of the collection.
QColor color(int index) const
Find color by index.
void setEditable(Editable editable)
Change whether the collection may be edited.
KColorCollection(const KColorCollection &)
KColorCollection copy constructor.
KColorCollection(const QString &name=QString())
KColorCollection constructor.
int findColor(const QColor &color) const
Find index by color.
int addColor(const QColor &newColor, const QString &newColorName=QString())
Add a color.
bool save()
Save the collection.
Editable
Used to specify whether a collection may be edited.
Definition kcolorcollection.h:99
@ Ask
Ask user before editing.
Definition kcolorcollection.h:102
@ Yes
Collection may be edited.
Definition kcolorcollection.h:100
@ No
Collection may not be edited.
Definition kcolorcollection.h:101