F:/KPlato/koffice/libs/kofficecore/KoDocumentInfo.h

Aller à la documentation de ce fichier.
00001 /* This file is part of the KDE project
00002    Copyright (C) 1998, 1999, 2000 Torben Weis <weis@kde.org>
00003    Copyright (C) 2004 David Faure <faure@kde.org>
00004    Copyright (C) 2006 Martin Pfeiffer <hubipete@gmx.net>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef KO_DOCUMENT_INFO_H
00023 #define KO_DOCUMENT_INFO_H
00024 
00025 #include <QObject>
00026 #include <QMap>
00027 #include <QString>
00028 #include <QStringList>
00029 
00030 #include <kconfig.h>
00031 #include <koffice_export.h>
00032 #include <KoXmlReader.h>
00033 
00034 class QDomDocument;
00035 class QDomElement;
00036 class QDomNode;
00037 class KoStore;
00038 class KoXmlWriter;
00039 
00052 class KOFFICECORE_EXPORT KoDocumentInfo : public QObject
00053 {
00054   Q_OBJECT
00055 
00056   public:
00061     KoDocumentInfo( QObject* parent = 0 );
00062 
00064     ~KoDocumentInfo();
00065 
00071     bool loadOasis( const KoXmlDocument& metaDoc );
00072 
00078     bool saveOasis( KoStore* store );
00079 
00085     bool load( const KoXmlDocument& doc );
00086 
00091     QDomDocument save();
00092 
00098     void setAuthorInfo( const QString& info, const QString& data );
00099 
00105     QString authorInfo( const QString& info ) const;
00106 
00112     void setAboutInfo( const QString& info, const QString& data );
00113 
00119     QString aboutInfo( const QString& info ) const;
00120 
00122     void resetMetaData();
00123 
00124   private:
00130     bool loadOasisAboutInfo( const KoXmlNode& metaDoc );
00131 
00137     bool saveOasisAboutInfo( KoXmlWriter &xmlWriter );
00138 
00144     bool loadAboutInfo( const KoXmlElement& e );
00145 
00151     QDomElement saveAboutInfo( QDomDocument& doc );
00152 
00158     bool loadOasisAuthorInfo( const KoXmlNode& metaDoc );
00159 
00165     bool loadAuthorInfo( const KoXmlElement& e );
00166 
00172     QDomElement saveAuthorInfo( QDomDocument& doc );
00173 
00179     bool saveOasisAuthorInfo( KoXmlWriter &xmlWriter );
00180 
00182     void saveParameters();
00183 
00185     QStringList m_aboutTags;
00187     QStringList m_authorTags;
00189     QMap<QString, QString> m_authorInfo;
00191     QMap<QString, QString> m_aboutInfo;
00192 
00193     bool m_firstSave;
00194 };
00195 
00196 #endif

Généré le Wed Nov 22 23:41:02 2006 pour KPlato par  doxygen 1.5.1-p1