KDEUI
kcolorcollection.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KDELIBS_KCOLORCOLLECTION_H
00023 #define KDELIBS_KCOLORCOLLECTION_H
00024
00025 #include <kdeui_export.h>
00026
00027 #include <QtGui/QColor>
00028 #include <QtCore/QList>
00029 #include <QtCore/QString>
00030 #include <QtCore/QStringList>
00031
00042 class KDEUI_EXPORT KColorCollection
00043 {
00044 public:
00050 static QStringList installedCollections();
00051
00057 explicit KColorCollection(const QString &name=QString());
00058
00062 KColorCollection(const KColorCollection &);
00063
00067 ~KColorCollection();
00068
00072 KColorCollection& operator=( const KColorCollection &);
00073
00079 bool save();
00080
00085 QString description() const;
00086
00091 void setDescription(const QString &desc);
00092
00097 QString name() const;
00098
00103 void setName(const QString &name);
00104
00110 enum Editable { Yes,
00111 No,
00112 Ask
00113 };
00114
00119 Editable editable() const;
00120
00125 void setEditable(Editable editable);
00126
00131 int count() const;
00132
00138 QColor color(int index) const;
00139
00146 int findColor(const QColor &color) const;
00147
00155 QString name(int index) const;
00156
00164 QString name(const QColor &color) const;
00165
00173 int addColor(const QColor &newColor,
00174 const QString &newColorName = QString());
00175
00185 int changeColor(int index,
00186 const QColor &newColor,
00187 const QString &newColorName = QString());
00188
00198 int changeColor(const QColor &oldColor,
00199 const QColor &newColor,
00200 const QString &newColorName = QString());
00201
00202 private:
00203 class KColorCollectionPrivate *d;
00204 };
00205
00206
00207 #endif // KDELIBS_KCOLORCOLLECTION_H
00208