diff options
author | Jenkins CI <null@kde.org> | 2013-12-18 00:45:18 +0000 |
---|---|---|
committer | Jenkins CI <null@kde.org> | 2013-12-18 00:45:18 +0000 |
commit | c38b88497a833e482e6892b72c8f52adec6de857 (patch) | |
tree | 8c2d4b788cf54ab2179ffe53515d276feaeba2d1 /tier1/kconfig/src/gui/kconfigloaderhandler_p.h | |
download | kconfig-c38b88497a833e482e6892b72c8f52adec6de857.tar.gz kconfig-c38b88497a833e482e6892b72c8f52adec6de857.tar.bz2 |
Initial import from the monolithic kdelibs.
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
techbase wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://community.kde.org/Frameworks/GitOldHistory
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo, kdelibs frameworks branch, at commit
162066dbbecde401a7347a1cff4fe72a9c919f58
Diffstat (limited to 'tier1/kconfig/src/gui/kconfigloaderhandler_p.h')
-rw-r--r-- | tier1/kconfig/src/gui/kconfigloaderhandler_p.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/tier1/kconfig/src/gui/kconfigloaderhandler_p.h b/tier1/kconfig/src/gui/kconfigloaderhandler_p.h new file mode 100644 index 00000000..f0766346 --- /dev/null +++ b/tier1/kconfig/src/gui/kconfigloaderhandler_p.h @@ -0,0 +1,68 @@ +/* + * Copyright 2007-2008 Aaron Seigo <aseigo@kde.org> + * Copyright 2013 Marco Martin <mart@kde.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef KCONFIGLOADERHANDLER_P_H +#define KCONFIGLOADERHANDLER_P_H + +#include <QXmlDefaultHandler> + +class ConfigLoaderHandler : public QXmlDefaultHandler +{ +public: + ConfigLoaderHandler(KConfigLoader *config, ConfigLoaderPrivate *d); + bool startElement(const QString &namespaceURI, const QString &localName, + const QString &qName, const QXmlAttributes &atts); + bool endElement(const QString &namespaceURI, const QString &localName, + const QString &qName); + bool characters(const QString &ch); + + QString name() const; + void setName(const QString &name); + QString key() const; + void setKey(const QString &name); + QString type() const; + QString currentGroup() const; + QString defaultValue() const; + +private: + virtual void addItem(); + void resetState(); + + KConfigLoader *m_config; + ConfigLoaderPrivate *d; + int m_min; + int m_max; + QString m_currentGroup; + QString m_name; + QString m_key; + QString m_type; + QString m_label; + QString m_default; + QString m_cdata; + QString m_whatsThis; + KConfigSkeleton::ItemEnum::Choice m_choice; + QList<KConfigSkeleton::ItemEnum::Choice> m_enumChoices; + bool m_haveMin; + bool m_haveMax; + bool m_inChoice; +}; + +#endif + |