Ananas Library 0.9.5
aextxml.h
1/****************************************************************************
2** $Id: aextxml.h,v 1.4 2006/08/20 11:28:32 leader Exp $
3**
4** Extension object header file of
5** Ananas application library
6**
7** Created : 20031201
8**
9** Copyright (C) 2003-2004 Leader InfoTech. All rights reserved.
10** Copyright (C) 2003-2005 Grigory Panov, Yoshkar-Ola.
11**
12** This file is part of the Designer application of the Ananas
13** automation accounting system.
14**
15** This file may be distributed and/or modified under the terms of the
16** GNU General Public License version 2 as published by the Free Software
17** Foundation and appearing in the file LICENSE.GPL included in the
18** packaging of this file.
19**
20** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
21** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22**
23** See http://www.leaderit.ru/page=ananas or email sales@leaderit.ru
24** See http://www.leaderit.ru/gpl/ for GPL licensing information.
25**
26** Contact org@leaderit.ru if any conditions of this licensing are
27** not clear to you.
28**
29**********************************************************************/
30
31#ifndef AEXTXML_H
32#define AEXTXML_H
33
34#include <qdom.h>
35#include "aextension.h"
36
44class ANANAS_EXPORT AExtXML : public AExtension
45{
46 Q_OBJECT
47
48public:
49
50 AExtXML();
51 ~AExtXML();
52public:
53
54public slots:
55 bool read(const QString &fname);
56 bool write(const QString &fname);
57 void createNew( const QString &rootnodename );
58
59 bool isRoot();
60 bool parent();
61 bool newChild( const QString &childname );
62 QString nodeName();
63 bool setText( const QString &text );
64 QString text() const;
65
66 bool setAttr( const QString &name, const QString &value );
67 QString attr( const QString &name ) const;
68 bool removeAttr( const QString &name );
69
70 bool firstChild();
71 bool lastChild();
72 bool next();
73 bool prev();
74 bool childExists();
75
76private:
77 QDomDocument xml;
78 QDomElement rootnode, current;
79
80
81};
82
83#endif //AEXTTEXT_H
bool setAttr(const QString &name, const QString &value)
Определения aextxml.cpp:293
bool parent()
Определения aextxml.cpp:189
void createNew(const QString &rootnodename)
Определения aextxml.cpp:154
bool firstChild()
Определения aextxml.cpp:344
QString attr(const QString &name) const
Определения aextxml.cpp:313
bool next()
Определения aextxml.cpp:380
bool prev()
Определения aextxml.cpp:398
bool lastChild()
Определения aextxml.cpp:362
AExtXML()
Определения aextxml.cpp:56
QString text() const
Определения aextxml.cpp:271
bool childExists()
Определения aextxml.cpp:416
bool setText(const QString &text)
Определения aextxml.cpp:246
bool write(const QString &fname)
Определения aextxml.cpp:124
QString nodeName()
Определения aextxml.cpp:226
bool isRoot()
Определения aextxml.cpp:174
bool newChild(const QString &childname)
Определения aextxml.cpp:207
bool read(const QString &fname)
Определения aextxml.cpp:88
bool removeAttr(const QString &name)
Определения aextxml.cpp:328