diff --git a/src/plasma/configloader.cpp b/src/plasma/configloader.cpp index d9f38f5ff..b9b41da28 100644 --- a/src/plasma/configloader.cpp +++ b/src/plasma/configloader.cpp @@ -19,6 +19,7 @@ #include "configloader.h" #include "private/configloader_p.h" +#include "private/configloaderhandler_p.h" #include #include @@ -32,37 +33,6 @@ namespace Plasma { -class ConfigLoaderHandler : public QXmlDefaultHandler -{ -public: - ConfigLoaderHandler(ConfigLoader *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); - -private: - void addItem(); - void resetState(); - - ConfigLoader *m_config; - ConfigLoaderPrivate *d; - int m_min; - int m_max; - 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; -}; void ConfigLoaderPrivate::parse(ConfigLoader *loader, QIODevice *xml) { diff --git a/src/plasma/private/configloaderhandler_p.h b/src/plasma/private/configloaderhandler_p.h new file mode 100644 index 000000000..865a36c4b --- /dev/null +++ b/src/plasma/private/configloaderhandler_p.h @@ -0,0 +1,66 @@ +/* + * 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 PLASMA_CONFIGLOADERHANDLER_P_H +#define PLASMA_CONFIGLOADERHANDLER_P_H + +#include + +#include + +namespace Plasma +{ + +class ConfigLoaderHandler : public QXmlDefaultHandler +{ +public: + ConfigLoaderHandler(ConfigLoader *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); + +private: + void addItem(); + void resetState(); + + ConfigLoader *m_config; + ConfigLoaderPrivate *d; + int m_min; + int m_max; + 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; +}; + +} // namespace Plasma + +#endif +