KDEUI
kconfigskeleton.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
00023 #ifndef KCONFIGSKELETON_H
00024 #define KCONFIGSKELETON_H
00025
00026 #include <kdeui_export.h>
00027
00028 #include <kcoreconfigskeleton.h>
00029
00030 #include <QtGui/QColor>
00031 #include <QtGui/QFont>
00032
00040 class KDEUI_EXPORT KConfigSkeleton : public KCoreConfigSkeleton
00041 {
00042 Q_OBJECT
00043 public:
00047 class KDEUI_EXPORT ItemColor:public KConfigSkeletonGenericItem < QColor >
00048 {
00049 public:
00051 ItemColor(const QString & _group, const QString & _key,
00052 QColor & reference,
00053 const QColor & defaultValue = QColor(128, 128, 128));
00054
00056 void readConfig(KConfig * config);
00057
00059 void setProperty(const QVariant & p);
00060
00062 bool isEqual(const QVariant &p) const;
00063
00065 QVariant property() const;
00066 };
00067
00068
00072 class KDEUI_EXPORT ItemFont:public KConfigSkeletonGenericItem < QFont >
00073 {
00074 public:
00076 ItemFont(const QString & _group, const QString & _key, QFont & reference,
00077 const QFont & defaultValue = QFont());
00078
00080 void readConfig(KConfig * config);
00081
00083 void setProperty(const QVariant & p);
00084
00086 bool isEqual(const QVariant &p) const;
00087
00089 QVariant property() const;
00090 };
00091
00092 public:
00099 explicit KConfigSkeleton(const QString & configname = QString(), QObject* parent = 0);
00100
00106 explicit KConfigSkeleton(KSharedConfig::Ptr config, QObject* parent = 0);
00107
00119 ItemColor *addItemColor(const QString & name, QColor & reference,
00120 const QColor & defaultValue = QColor(128, 128, 128),
00121 const QString & key = QString());
00122
00134 ItemFont *addItemFont(const QString & name, QFont & reference,
00135 const QFont & defaultValue = QFont(),
00136 const QString & key = QString());
00137
00138 };
00139
00140 #endif