From c38b88497a833e482e6892b72c8f52adec6de857 Mon Sep 17 00:00:00 2001 From: Jenkins CI Date: Wed, 18 Dec 2013 00:45:18 +0000 Subject: 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 --- tier1/kconfig/src/gui/kconfigloaderhandler_p.h | 68 ++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 tier1/kconfig/src/gui/kconfigloaderhandler_p.h (limited to 'tier1/kconfig/src/gui/kconfigloaderhandler_p.h') 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 + * Copyright 2013 Marco Martin + * + * 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 + +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 m_enumChoices; + bool m_haveMin; + bool m_haveMax; + bool m_inChoice; +}; + +#endif + -- cgit v1.2.1