Fix some error
[kdeartwork.git] / kscreensaver / kxsconfig / kxsxml.h
blob66350ac1f41a49cef9a7d629792f70a73e6ac5dd
1 //-----------------------------------------------------------------------------
2 //
3 // KDE xscreensaver configuration dialog
4 //
5 // Copyright (c) Martin R. Jones <mjones@kde.org> 2002
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public
9 // License as published by the Free Software Foundation;
10 // version 2 of the License.
12 // This program 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 // General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; see the file COPYING. If not, write to
19 // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 // Boston, MA 02110-1301, USA.
22 #ifndef KXSXML_H
23 #define KXSXML_H
25 #include "kxsconfig.h"
26 #include <qxml.h>
27 #include <q3ptrstack.h>
28 //Added by qt3to4:
29 #include <Q3PtrList>
31 class KXSXmlHandler;
33 class KXSXml
35 public:
36 KXSXml( QWidget *p );
38 bool parse( const QString &filename );
39 const Q3PtrList<KXSConfigItem> *items() const;
40 QString description() const;
42 private:
43 QWidget *parent;
44 KXSXmlHandler *handler;
47 class KXSXmlHandler : public QXmlDefaultHandler
49 public:
50 KXSXmlHandler( QWidget *p );
52 bool startDocument();
53 bool startElement( const QString&, const QString&, const QString& ,
54 const QXmlAttributes& );
55 bool endElement( const QString&, const QString&, const QString& );
56 bool characters( const QString & );
58 const Q3PtrList<KXSConfigItem> *items() const { return &mConfigItemList; }
59 const QString &description() const { return desc; }
61 private:
62 QWidget *parent;
63 KXSSelectItem *selItem;
64 bool inDesc;
65 QString desc;
66 Q3PtrList<KXSConfigItem> mConfigItemList;
67 Q3PtrStack<QWidget> mParentStack;
70 #endif // KXSXML_H