• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • sources
  • kde-4.14
  • kdelibs
  • kdecore
  • config
kcoreconfigskeleton.h
Go to the documentation of this file.
1 /*
2  * This file is part of KDE.
3  *
4  * Copyright (c) 2001,2002,2003 Cornelius Schumacher <schumacher@kde.org>
5  * Copyright (c) 2003 Waldo Bastian <bastian@kde.org>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public License
18  * along with this library; see the file COPYING.LIB. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef KCORECONFIGSKELETON_H
24 #define KCORECONFIGSKELETON_H
25 
26 #include <kdecore_export.h>
27 
28 #include <kurl.h>
29 #include <ksharedconfig.h>
30 #include <kconfiggroup.h>
31 
32 #include <QtCore/QDate>
33 #include <QtCore/QHash>
34 #include <QtCore/QRect>
35 #include <QtCore/QStringList>
36 #include <QtCore/QVariant>
37 
38  class KConfigSkeletonItemPrivate;
52  class KDECORE_EXPORT KConfigSkeletonItem
53  {
54  public:
55  typedef QList < KConfigSkeletonItem * >List;
56  typedef QHash < QString, KConfigSkeletonItem* > Dict;
57  typedef QHash < QString, KConfigSkeletonItem* >::Iterator DictIterator;
58 
65  KConfigSkeletonItem(const QString & _group, const QString & _key);
66 
70  virtual ~KConfigSkeletonItem();
71 
75  void setGroup( const QString &_group );
76 
80  QString group() const;
81 
85  void setKey( const QString &_key );
86 
90  QString key() const;
91 
95  void setName(const QString &_name);
96 
100  QString name() const;
101 
105  void setLabel( const QString &l );
106 
110  QString label() const;
111 
116  void setToolTip( const QString &t );
117 
122  QString toolTip() const;
123 
127  void setWhatsThis( const QString &w );
128 
132  QString whatsThis() const;
133 
138  virtual void readConfig(KConfig *) = 0;
139 
144  virtual void writeConfig(KConfig *) = 0;
145 
149  virtual void readDefault(KConfig *) = 0;
150 
154  virtual void setProperty(const QVariant &p) = 0;
155 
165  virtual bool isEqual(const QVariant &p) const = 0;
166 
170  virtual QVariant property() const = 0;
171 
175  virtual QVariant minValue() const;
176 
180  virtual QVariant maxValue() const;
181 
185  virtual void setDefault() = 0;
186 
191  virtual void swapDefault() = 0;
192 
196  bool isImmutable() const;
197 
198  protected:
203  void readImmutability(const KConfigGroup &group);
204 
205  QString mGroup;
206  QString mKey;
207  QString mName;
208 
209  private:
210  KConfigSkeletonItemPrivate * const d;
211  };
212 
213 
217 template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonItem
218  {
219  public:
224  KConfigSkeletonGenericItem(const QString & _group, const QString & _key, T & reference,
225  T defaultValue)
226  : KConfigSkeletonItem(_group, _key), mReference(reference),
227  mDefault(defaultValue), mLoadedValue(defaultValue)
228  {
229  }
230 
234  void setValue(const T & v)
235  {
236  mReference = v;
237  }
238 
242  T & value()
243  {
244  return mReference;
245  }
246 
250  const T & value() const
251  {
252  return mReference;
253  }
254 
258  virtual void setDefaultValue( const T &v )
259  {
260  mDefault = v;
261  }
262 
266  virtual void setDefault()
267  {
268  mReference = mDefault;
269  }
270 
272  virtual void writeConfig(KConfig * config)
273  {
274  if ( mReference != mLoadedValue ) // Is this needed?
275  {
276  KConfigGroup cg(config, mGroup);
277  if ((mDefault == mReference) && !cg.hasDefault( mKey))
278  cg.revertToDefault( mKey );
279  else
280  cg.writeEntry(mKey, mReference);
281  }
282  }
283 
285  void readDefault(KConfig * config)
286  {
287  config->setReadDefaults(true);
288  readConfig(config);
289  config->setReadDefaults(false);
290  mDefault = mReference;
291  }
292 
294  void swapDefault()
295  {
296  T tmp = mReference;
297  mReference = mDefault;
298  mDefault = tmp;
299  }
300 
301  protected:
302  T & mReference;
303  T mDefault;
304  T mLoadedValue;
305  };
306 
366 class KDECORE_EXPORT KCoreConfigSkeleton : public QObject
367 {
368  Q_OBJECT
369 public:
373  class KDECORE_EXPORT ItemString:public KConfigSkeletonGenericItem < QString >
374  {
375  public:
376  enum Type { Normal, Password, Path };
377 
395  ItemString(const QString & _group, const QString & _key,
396  QString & reference,
397  const QString & defaultValue = QLatin1String(""), // NOT QString() !!
398  Type type = Normal);
399 
401  void writeConfig(KConfig * config);
402 
404  void readConfig(KConfig * config);
405 
407  void setProperty(const QVariant & p);
408 
410  bool isEqual(const QVariant &p) const;
411 
413  QVariant property() const;
414 
415  private:
416  Type mType;
417  };
418 
422  class KDECORE_EXPORT ItemPassword:public ItemString
423  {
424  public:
426  ItemPassword(const QString & _group, const QString & _key,
427  QString & reference,
428  const QString & defaultValue = QLatin1String("")); // NOT QString() !!
429  };
430 
434  class KDECORE_EXPORT ItemPath:public ItemString
435  {
436  public:
438  ItemPath(const QString & _group, const QString & _key,
439  QString & reference,
440  const QString & defaultValue = QString());
441  };
442 
446  class KDECORE_EXPORT ItemUrl:public KConfigSkeletonGenericItem < KUrl >
447  {
448  public:
449 
452  ItemUrl(const QString & _group, const QString & _key,
453  KUrl & reference,
454  const KUrl & defaultValue = KUrl());
455 
457  void writeConfig(KConfig * config);
458 
460  void readConfig(KConfig * config);
461 
463  void setProperty(const QVariant & p);
464 
466  bool isEqual(const QVariant &p) const;
467 
469  QVariant property() const;
470  };
471 
475  class KDECORE_EXPORT ItemProperty:public KConfigSkeletonGenericItem < QVariant >
476  {
477  public:
479  ItemProperty(const QString & _group, const QString & _key,
480  QVariant & reference, const QVariant & defaultValue = 0);
481 
482  void readConfig(KConfig * config);
483  void setProperty(const QVariant & p);
484 
486  bool isEqual(const QVariant &p) const;
487 
489  QVariant property() const;
490  };
491 
492 
496  class KDECORE_EXPORT ItemBool:public KConfigSkeletonGenericItem < bool >
497  {
498  public:
500  ItemBool(const QString & _group, const QString & _key, bool & reference,
501  bool defaultValue = true);
502 
504  void readConfig(KConfig * config);
505 
507  void setProperty(const QVariant & p);
508 
510  bool isEqual(const QVariant &p) const;
511 
513  QVariant property() const;
514  };
515 
516 
520  class KDECORE_EXPORT ItemInt:public KConfigSkeletonGenericItem < qint32 >
521  {
522  public:
524  ItemInt(const QString & _group, const QString & _key, qint32 &reference,
525  qint32 defaultValue = 0);
526 
528  void readConfig(KConfig * config);
529 
531  void setProperty(const QVariant & p);
532 
534  bool isEqual(const QVariant &p) const;
535 
537  QVariant property() const;
538 
540  QVariant minValue() const;
541 
543  QVariant maxValue() const;
544 
548  void setMinValue(qint32);
549 
553  void setMaxValue(qint32);
554 
555  private:
556  bool mHasMin : 1;
557  bool mHasMax : 1;
558  qint32 mMin;
559  qint32 mMax;
560  };
561 
565  class KDECORE_EXPORT ItemLongLong:public KConfigSkeletonGenericItem < qint64 >
566  {
567  public:
569  ItemLongLong(const QString & _group, const QString & _key, qint64 &reference,
570  qint64 defaultValue = 0);
571 
573  void readConfig(KConfig * config);
574 
576  void setProperty(const QVariant & p);
577 
579  bool isEqual(const QVariant &p) const;
580 
582  QVariant property() const;
583 
585  QVariant minValue() const;
586 
588  QVariant maxValue() const;
589 
591  void setMinValue(qint64);
592 
594  void setMaxValue(qint64);
595 
596  private:
597  bool mHasMin : 1;
598  bool mHasMax : 1;
599  qint64 mMin;
600  qint64 mMax;
601  };
602 #ifndef KDE_NO_DEPRECATED
603  typedef KDE_DEPRECATED ItemLongLong ItemInt64;
604 #endif
605 
609  class KDECORE_EXPORT ItemEnum:public ItemInt
610  {
611  public:
612  //KDE5: remove the old Choice struct, rename Choice2 to Choice
613  struct Choice
614  {
615  QString name;
616  QString label;
617  QString whatsThis;
618  };
619 
620  struct Choice2
621  {
622  QString name;
623  QString label;
624  QString toolTip;
625  QString whatsThis;
626  };
627 
631  ItemEnum(const QString & _group, const QString & _key, qint32 &reference,
632  const QList<Choice> &choices, qint32 defaultValue = 0);
633 
637  ItemEnum(const QString & _group, const QString & _key, qint32 &reference,
638  const QList<Choice2> &choices, qint32 defaultValue = 0);
639 
640  QList<Choice> choices() const;
641  QList<Choice2> choices2() const;
642 
644  void readConfig(KConfig * config);
645 
647  void writeConfig(KConfig * config);
648 
649  private:
650  QList<Choice2> mChoices;
651  };
652 
653 
657  class KDECORE_EXPORT ItemUInt:public KConfigSkeletonGenericItem < quint32 >
658  {
659  public:
661  ItemUInt(const QString & _group, const QString & _key,
662  quint32 &reference, quint32 defaultValue = 0);
663 
665  void readConfig(KConfig * config);
666 
668  void setProperty(const QVariant & p);
669 
671  bool isEqual(const QVariant &p) const;
672 
674  QVariant property() const;
675 
677  QVariant minValue() const;
678 
680  QVariant maxValue() const;
681 
683  void setMinValue(quint32);
684 
686  void setMaxValue(quint32);
687 
688  private:
689  bool mHasMin : 1;
690  bool mHasMax : 1;
691  quint32 mMin;
692  quint32 mMax;
693  };
694 
698  class KDECORE_EXPORT ItemULongLong:public KConfigSkeletonGenericItem < quint64 >
699  {
700  public:
702  ItemULongLong(const QString & _group, const QString & _key, quint64 &reference,
703  quint64 defaultValue = 0);
704 
706  void readConfig(KConfig * config);
707 
709  void setProperty(const QVariant & p);
710 
712  bool isEqual(const QVariant &p) const;
713 
715  QVariant property() const;
716 
718  QVariant minValue() const;
719 
721  QVariant maxValue() const;
722 
724  void setMinValue(quint64);
725 
727  void setMaxValue(quint64);
728 
729  private:
730  bool mHasMin : 1;
731  bool mHasMax : 1;
732  quint64 mMin;
733  quint64 mMax;
734  };
735 #ifndef KDE_NO_DEPRECATED
736  typedef KDE_DEPRECATED ItemULongLong ItemUInt64;
737 #endif
738 
742  class KDECORE_EXPORT ItemDouble:public KConfigSkeletonGenericItem < double >
743  {
744  public:
746  ItemDouble(const QString & _group, const QString & _key,
747  double &reference, double defaultValue = 0);
748 
750  void readConfig(KConfig * config);
751 
753  void setProperty(const QVariant & p);
754 
756  bool isEqual(const QVariant &p) const;
757 
759  QVariant property() const;
760 
762  QVariant minValue() const;
763 
765  QVariant maxValue() const;
766 
768  void setMinValue(double);
769 
771  void setMaxValue(double);
772 
773  private:
774  bool mHasMin : 1;
775  bool mHasMax : 1;
776  double mMin;
777  double mMax;
778  };
779 
780 
784  class KDECORE_EXPORT ItemRect:public KConfigSkeletonGenericItem < QRect >
785  {
786  public:
788  ItemRect(const QString & _group, const QString & _key, QRect & reference,
789  const QRect & defaultValue = QRect());
790 
792  void readConfig(KConfig * config);
793 
795  void setProperty(const QVariant & p);
796 
798  bool isEqual(const QVariant &p) const;
799 
801  QVariant property() const;
802  };
803 
804 
808  class KDECORE_EXPORT ItemPoint:public KConfigSkeletonGenericItem < QPoint >
809  {
810  public:
812  ItemPoint(const QString & _group, const QString & _key, QPoint & reference,
813  const QPoint & defaultValue = QPoint());
814 
816  void readConfig(KConfig * config);
817 
819  void setProperty(const QVariant & p);
820 
822  bool isEqual(const QVariant &p) const;
823 
825  QVariant property() const;
826  };
827 
828 
832  class KDECORE_EXPORT ItemSize:public KConfigSkeletonGenericItem < QSize >
833  {
834  public:
836  ItemSize(const QString & _group, const QString & _key, QSize & reference,
837  const QSize & defaultValue = QSize());
838 
840  void readConfig(KConfig * config);
841 
843  void setProperty(const QVariant & p);
844 
846  bool isEqual(const QVariant &p) const;
847 
849  QVariant property() const;
850  };
851 
852 
856  class KDECORE_EXPORT ItemDateTime:public KConfigSkeletonGenericItem < QDateTime >
857  {
858  public:
860  ItemDateTime(const QString & _group, const QString & _key,
861  QDateTime & reference,
862  const QDateTime & defaultValue = QDateTime());
863 
865  void readConfig(KConfig * config);
866 
868  void setProperty(const QVariant & p);
869 
871  bool isEqual(const QVariant &p) const;
872 
874  QVariant property() const;
875  };
876 
877 
881  class KDECORE_EXPORT ItemStringList:public KConfigSkeletonGenericItem < QStringList >
882  {
883  public:
885  ItemStringList(const QString & _group, const QString & _key,
886  QStringList & reference,
887  const QStringList & defaultValue = QStringList());
888 
890  void readConfig(KConfig * config);
891 
893  void setProperty(const QVariant & p);
894 
896  bool isEqual(const QVariant &p) const;
897 
899  QVariant property() const;
900  };
901 
902 
906  class KDECORE_EXPORT ItemPathList:public ItemStringList
907  {
908  public:
910  ItemPathList(const QString & _group, const QString & _key,
911  QStringList & reference,
912  const QStringList & defaultValue = QStringList());
913 
915  void readConfig(KConfig * config);
917  void writeConfig(KConfig * config);
918  };
919 
923  class KDECORE_EXPORT ItemUrlList:public KConfigSkeletonGenericItem < KUrl::List >
924  {
925  public:
927  ItemUrlList(const QString & _group, const QString & _key,
928  KUrl::List & reference,
929  const KUrl::List & defaultValue = KUrl::List());
930 
932  void readConfig(KConfig * config);
933 
935  void writeConfig(KConfig * config);
936 
938  void setProperty(const QVariant & p);
939 
941  bool isEqual(const QVariant &p) const;
942 
944  QVariant property() const;
945  };
946 
950  class KDECORE_EXPORT ItemIntList:public KConfigSkeletonGenericItem < QList < int > >
951  {
952  public:
954  ItemIntList(const QString & _group, const QString & _key,
955  QList < int >&reference,
956  const QList < int >&defaultValue = QList < int >());
957 
959  void readConfig(KConfig * config);
960 
962  void setProperty(const QVariant & p);
963 
965  bool isEqual(const QVariant &p) const;
966 
968  QVariant property() const;
969  };
970 
971 
972 public:
980  explicit KCoreConfigSkeleton(const QString & configname = QString(), QObject* parent = 0);
981 
988  explicit KCoreConfigSkeleton(KSharedConfig::Ptr config, QObject* parent = 0);
989 
993  virtual ~KCoreConfigSkeleton();
994 
1003  virtual void setDefaults();
1004 
1014  virtual void readConfig();
1015 
1025  virtual void writeConfig();
1026 
1032  void setCurrentGroup(const QString & group);
1033 
1037  QString currentGroup() const;
1038 
1048  void addItem(KConfigSkeletonItem *, const QString & name = QString() );
1049 
1061  ItemString *addItemString(const QString & name, QString & reference,
1062  const QString & defaultValue = QLatin1String(""), // NOT QString() !!
1063  const QString & key = QString());
1064 
1078  ItemPassword *addItemPassword(const QString & name, QString & reference,
1079  const QString & defaultValue = QLatin1String(""),
1080  const QString & key = QString());
1081 
1095  ItemPath *addItemPath(const QString & name, QString & reference,
1096  const QString & defaultValue = QLatin1String(""),
1097  const QString & key = QString());
1098 
1112  ItemProperty *addItemProperty(const QString & name, QVariant & reference,
1113  const QVariant & defaultValue = QVariant(),
1114  const QString & key = QString());
1126  ItemBool *addItemBool(const QString & name, bool & reference,
1127  bool defaultValue = false,
1128  const QString & key = QString());
1129 
1141  ItemInt *addItemInt(const QString & name, qint32 &reference, qint32 defaultValue = 0,
1142  const QString & key = QString());
1143 
1155  ItemUInt *addItemUInt(const QString & name, quint32 &reference,
1156  quint32 defaultValue = 0,
1157  const QString & key = QString());
1158 
1170  ItemLongLong *addItemLongLong(const QString & name, qint64 &reference,
1171  qint64 defaultValue = 0,
1172  const QString & key = QString());
1173 
1178 #ifndef KDE_NO_DEPRECATED
1179  KDE_DEPRECATED ItemLongLong *addItemInt64( const QString& name, qint64 &reference,
1180  qint64 defaultValue = 0,
1181  const QString & key = QString());
1182 #endif
1183 
1195  ItemULongLong *addItemULongLong(const QString & name, quint64 &reference,
1196  quint64 defaultValue = 0,
1197  const QString & key = QString());
1198 
1203 #ifndef KDE_NO_DEPRECATED
1204  KDE_DEPRECATED ItemULongLong *addItemUInt64(const QString & name, quint64 &reference,
1205  quint64 defaultValue = 0,
1206  const QString & key = QString());
1207 #endif
1208 
1220  ItemDouble *addItemDouble(const QString & name, double &reference,
1221  double defaultValue = 0.0,
1222  const QString & key = QString());
1223 
1235  ItemRect *addItemRect(const QString & name, QRect & reference,
1236  const QRect & defaultValue = QRect(),
1237  const QString & key = QString());
1238 
1250  ItemPoint *addItemPoint(const QString & name, QPoint & reference,
1251  const QPoint & defaultValue = QPoint(),
1252  const QString & key = QString());
1253 
1265  ItemSize *addItemSize(const QString & name, QSize & reference,
1266  const QSize & defaultValue = QSize(),
1267  const QString & key = QString());
1268 
1280  ItemDateTime *addItemDateTime(const QString & name, QDateTime & reference,
1281  const QDateTime & defaultValue = QDateTime(),
1282  const QString & key = QString());
1283 
1295  ItemStringList *addItemStringList(const QString & name, QStringList & reference,
1296  const QStringList & defaultValue = QStringList(),
1297  const QString & key = QString());
1298 
1310  ItemIntList *addItemIntList(const QString & name, QList < int >&reference,
1311  const QList < int >&defaultValue =
1312  QList < int >(),
1313  const QString & key = QString());
1314 
1318  KConfig *config();
1319 
1323  const KConfig *config() const;
1324 
1328  void setSharedConfig(KSharedConfig::Ptr pConfig);
1329 
1333  KConfigSkeletonItem::List items() const;
1334 
1335  // KDE5 TODO: Remove this non-const version. Kept only for BC.
1339  bool isImmutable(const QString & name);
1340 
1345  bool isImmutable(const QString & name) const;
1346 
1347  // KDE5 TODO: Remove this non-const version. Kept only for BC.
1351  KConfigSkeletonItem * findItem(const QString & name);
1352 
1357  KConfigSkeletonItem * findItem(const QString & name) const;
1358 
1371  virtual bool useDefaults(bool b);
1372 
1373 Q_SIGNALS:
1377  void configChanged();
1378 
1379 protected:
1388  virtual bool usrUseDefaults(bool b);
1389 
1395  virtual void usrSetDefaults();
1396 
1402  virtual void usrReadConfig();
1403 
1409  virtual void usrWriteConfig();
1410 
1411 private:
1412  class Private;
1413  Private * const d;
1414  friend class KConfigSkeleton;
1415 
1416 };
1417 
1418 #endif
KCoreConfigSkeleton::ItemULongLong
Class for handling unsigned 64-bit integer preferences item.
Definition: kcoreconfigskeleton.h:698
KConfigSkeletonItem::setProperty
virtual void setProperty(const QVariant &p)=0
Set item to p.
KSharedPtr< KSharedConfig >
KConfigSkeletonGenericItem
Definition: kcoreconfigskeleton.h:217
qint64
KConfigSkeletonItemPrivate
Definition: kcoreconfigskeleton_p.h:51
KConfigSkeletonGenericItem::setDefault
virtual void setDefault()
Set the value for this item to the default value.
Definition: kcoreconfigskeleton.h:266
KFileSystemType::Type
Type
Definition: kfilesystemtype_p.h:28
KCoreConfigSkeleton::ItemInt64
ItemLongLong ItemInt64
Definition: kcoreconfigskeleton.h:603
KCoreConfigSkeleton::ItemInt::readConfig
void readConfig(KConfig *config)
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file...
Definition: kcoreconfigskeleton.cpp:317
KConfigSkeletonGenericItem::setValue
void setValue(const T &v)
Set value of this KConfigSkeletonItem.
Definition: kcoreconfigskeleton.h:234
KCoreConfigSkeleton::ItemDouble
Class for handling a floating point preference item.
Definition: kcoreconfigskeleton.h:742
KCoreConfigSkeleton::ItemString
Class for handling a string preferences item.
Definition: kcoreconfigskeleton.h:373
kurl.h
T
#define T
KConfigSkeletonGenericItem::KConfigSkeletonGenericItem
KConfigSkeletonGenericItem(const QString &_group, const QString &_key, T &reference, T defaultValue)
Constructor.
Definition: kcoreconfigskeleton.h:224
KCoreConfigSkeleton::ItemUInt64
ItemULongLong ItemUInt64
Definition: kcoreconfigskeleton.h:736
kdecore_export.h
KConfig::setReadDefaults
void setReadDefaults(bool b)
defaults
Definition: kconfig.cpp:715
KMacroExpander::group
Definition: kmacroexpander_unix.cpp:34
KCoreConfigSkeleton::ItemEnum::Choice::label
QString label
Definition: kcoreconfigskeleton.h:616
KConfigGroup::hasDefault
bool hasDefault(const QString &key) const
Whether a default is specified for an entry in either the system wide configuration file or the globa...
Definition: kconfiggroup.cpp:1139
KConfigSkeletonItem::isImmutable
bool isImmutable() const
Return if the entry can be modified.
Definition: kcoreconfigskeleton.cpp:113
KConfigSkeletonGenericItem::readDefault
void readDefault(KConfig *config)
Read global default value.
Definition: kcoreconfigskeleton.h:285
KCoreConfigSkeleton::ItemEnum::Choice
Definition: kcoreconfigskeleton.h:613
KConfigGroup::writeEntry
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
Writes a value to the configuration object.
Definition: kconfiggroup.cpp:1037
KCoreConfigSkeleton::ItemDateTime
Class for handling a QDateTime preferences item.
Definition: kcoreconfigskeleton.h:856
quint32
QPoint
KCoreConfigSkeleton::ItemLongLong
Class for handling a 64-bit integer preferences item.
Definition: kcoreconfigskeleton.h:565
KCoreConfigSkeleton::ItemUrlList
Class for handling a url list preferences item.
Definition: kcoreconfigskeleton.h:923
KConfigSkeletonItem::maxValue
virtual QVariant maxValue() const
Return maximum value of item or invalid if not specified.
Definition: kcoreconfigskeleton.cpp:108
KCoreConfigSkeleton::ItemEnum::Choice2::name
QString name
Definition: kcoreconfigskeleton.h:622
KCoreConfigSkeleton::ItemPassword
Class for handling a password preferences item.
Definition: kcoreconfigskeleton.h:422
KConfigSkeletonGenericItem::mDefault
T mDefault
The default value for this item.
Definition: kcoreconfigskeleton.h:303
KUrl
Represents and parses a URL.
Definition: kurl.h:111
KGlobal::config
KSharedConfigPtr config()
Returns the general config object.
Definition: kglobal.cpp:139
KConfigSkeletonItem::readConfig
virtual void readConfig(KConfig *)=0
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file...
KConfigSkeletonGenericItem::swapDefault
void swapDefault()
Exchanges the current value with the default value Used by KCoreConfigSkeleton::useDefaults(bool);.
Definition: kcoreconfigskeleton.h:294
KCoreConfigSkeleton::ItemProperty
Class for handling a QVariant preferences item.
Definition: kcoreconfigskeleton.h:475
KConfigSkeletonItem::DictIterator
QHash< QString, KConfigSkeletonItem * >::Iterator DictIterator
Definition: kcoreconfigskeleton.h:57
QRect
readConfig
TsConfig readConfig(const QString &fname)
Definition: ktranscript.cpp:390
KConfigSkeletonItem::property
virtual QVariant property() const =0
Return item as property.
KCoreConfigSkeleton::ItemBool
Class for handling a bool preferences item.
Definition: kcoreconfigskeleton.h:496
KCoreConfigSkeleton::ItemString::Type
Type
The type of string that is held in this item.
Definition: kcoreconfigskeleton.h:376
KConfigSkeletonGenericItem::value
const T & value() const
Return const value of this KConfigSkeletonItem.
Definition: kcoreconfigskeleton.h:250
QHash< QString, KConfigSkeletonItem * >
KCoreConfigSkeleton::ItemUInt
Class for handling an unsigned 32-bit integer preferences item.
Definition: kcoreconfigskeleton.h:657
QObject
KCoreConfigSkeleton
Class for handling preferences settings for an application.
Definition: kcoreconfigskeleton.h:366
KConfigSkeletonItem::Dict
QHash< QString, KConfigSkeletonItem * > Dict
Definition: kcoreconfigskeleton.h:56
KCoreConfigSkeleton::ItemEnum::Choice2::label
QString label
Definition: kcoreconfigskeleton.h:623
ksharedconfig.h
QString
QList< KConfigSkeletonItem * >
KCoreConfigSkeleton::ItemEnum::Choice2::toolTip
QString toolTip
Definition: kcoreconfigskeleton.h:624
KCoreConfigSkeleton::ItemPathList
Class for handling a path list preferences item.
Definition: kcoreconfigskeleton.h:906
KCoreConfigSkeleton::ItemRect
Class for handling a QRect preferences item.
Definition: kcoreconfigskeleton.h:784
QStringList
KConfigSkeletonGenericItem::value
T & value()
Return value of this KConfigSkeletonItem.
Definition: kcoreconfigskeleton.h:242
addItem
static void addItem(KServiceGroup::List &sorted, const KSycocaEntry::Ptr &p, bool &addSeparator)
Definition: kservicegroup.cpp:362
QSize
KConfigSkeletonItem::mName
QString mName
The name of this item.
Definition: kcoreconfigskeleton.h:207
KCoreConfigSkeleton::Private
Definition: kcoreconfigskeleton_p.h:27
KCoreConfigSkeleton::ItemInt
Class for handling a 32-bit integer preferences item.
Definition: kcoreconfigskeleton.h:520
KCoreConfigSkeleton::ItemEnum::Choice2
Definition: kcoreconfigskeleton.h:620
KConfigGroup
A class for one specific group in a KConfig object.
Definition: kconfiggroup.h:53
KUrl::List
KUrl::List is a QList that contains KUrls with a few convenience methods.
Definition: kurl.h:146
KCoreConfigSkeleton::ItemPoint
Class for handling a QPoint preferences item.
Definition: kcoreconfigskeleton.h:808
KConfigSkeletonItem::List
QList< KConfigSkeletonItem * > List
Definition: kcoreconfigskeleton.h:55
KConfig
The central class of the KDE configuration data system.
Definition: kconfig.h:70
KCoreConfigSkeleton::ItemStringList::readConfig
void readConfig(KConfig *config)
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file...
Definition: kcoreconfigskeleton.cpp:833
QLatin1String
KCoreConfigSkeleton::ItemSize
Class for handling a QSize preferences item.
Definition: kcoreconfigskeleton.h:832
quint64
KConfigSkeletonItem::mKey
QString mKey
The config key for this item.
Definition: kcoreconfigskeleton.h:206
qint32
KCoreConfigSkeleton::ItemStringList
Class for handling a string list preferences item.
Definition: kcoreconfigskeleton.h:881
KConfigSkeletonGenericItem::mLoadedValue
T mLoadedValue
Definition: kcoreconfigskeleton.h:304
KConfigSkeletonItem
Class for storing a preferences setting.
Definition: kcoreconfigskeleton.h:52
KConfigSkeletonItem::mGroup
QString mGroup
The group name for this item.
Definition: kcoreconfigskeleton.h:205
KCoreConfigSkeleton::ItemIntList
Class for handling an integer list preferences item.
Definition: kcoreconfigskeleton.h:950
KCoreConfigSkeleton::ItemEnum::Choice::name
QString name
Definition: kcoreconfigskeleton.h:615
KConfigSkeletonItem::isEqual
virtual bool isEqual(const QVariant &p) const =0
Check whether the item is equal to p.
KCoreConfigSkeleton::ItemEnum::Choice::whatsThis
QString whatsThis
Definition: kcoreconfigskeleton.h:617
KCoreConfigSkeleton::ItemUrl
Class for handling a url preferences item.
Definition: kcoreconfigskeleton.h:446
KConfigSkeletonGenericItem::mReference
T & mReference
Stores the value for this item.
Definition: kcoreconfigskeleton.h:302
KConfigGroup::revertToDefault
void revertToDefault(const QString &key)
Reverts an entry to the default settings.
Definition: kconfiggroup.cpp:1125
KConfigSkeletonGenericItem::setDefaultValue
virtual void setDefaultValue(const T &v)
Set default value for this item.
Definition: kcoreconfigskeleton.h:258
kconfiggroup.h
KConfigSkeletonGenericItem::writeConfig
virtual void writeConfig(KConfig *config)
This function is called by KCoreConfigSkeleton to write the value of this setting to a config file...
Definition: kcoreconfigskeleton.h:272
QDateTime
KCoreConfigSkeleton::ItemPath
Class for handling a path preferences item.
Definition: kcoreconfigskeleton.h:434
defaultValue
QString defaultValue(const QString &t)
Definition: kconfig_compiler.cpp:950
KConfigSkeletonItem::minValue
virtual QVariant minValue() const
Return minimum value of item or invalid if not specified.
Definition: kcoreconfigskeleton.cpp:103
KCoreConfigSkeleton::ItemEnum
Class for handling enums.
Definition: kcoreconfigskeleton.h:609
KCoreConfigSkeleton::ItemEnum::Choice2::whatsThis
QString whatsThis
Definition: kcoreconfigskeleton.h:625
QVariant
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal