KDECore
#include "kconfigbase.h"#include <kdecore_export.h>#include <QtCore/QExplicitlySharedDataPointer>#include <QtCore/QVariant>#include <QtCore/QStringList>#include "conversion_check.h"

Go to the source code of this file.
Classes | |
| class | KConfigGroup |
| class | KSharedPtr< T > |
Macros | |
| #define | KCONFIGGROUP_DECLARE_ENUM_QOBJECT(Class, Enum) |
| #define | KCONFIGGROUP_DECLARE_FLAGS_QOBJECT(Class, Flags) |
| #define | KCONFIGGROUP_ENUMERATOR_ERROR(ENUM) |
Typedefs | |
| typedef KSharedPtr< KSharedConfig > | KSharedConfigPtr |
Macro Definition Documentation
| #define KCONFIGGROUP_DECLARE_ENUM_QOBJECT | ( | Class, | |
| Enum | |||
| ) |
To add support for your own enums in KConfig, you can declare them with Q_ENUMS() in a QObject subclass (which will make moc generate the code to turn the enum into a string and vice-versa), and then (in the cpp code) use the macro KCONFIGGROUP_DECLARE_ENUM_QOBJECT(MyClass, MyEnum)
After that, you can use readEntry(group, key, value) and writeEntry(group, key, value[, flags]). Note that those are global functions, NOT member functions of KConfigGroup.
Definition at line 676 of file kconfiggroup.h.
| #define KCONFIGGROUP_DECLARE_FLAGS_QOBJECT | ( | Class, | |
| Flags | |||
| ) |
Similar to KCONFIGGROUP_DECLARE_ENUM_QOBJECT but for flags declared with Q_FLAGS() (where multiple values can be set at the same time)
Definition at line 699 of file kconfiggroup.h.
| #define KCONFIGGROUP_ENUMERATOR_ERROR | ( | ENUM | ) |
Definition at line 661 of file kconfiggroup.h.
Typedef Documentation
| typedef KSharedPtr<KSharedConfig> KSharedConfigPtr |
Definition at line 38 of file kconfiggroup.h.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.
KDE API Reference