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

Aller à la documentation de ce fichier.
00001 /* This file is part of the KDE project
00002    Copyright (c) 2003 Lukas Tinkl <lukas@kde.org>
00003    Copyright (c) 2003 David Faure <faure@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KOSTYLESTACK_H
00022 #define KOSTYLESTACK_H
00023 
00024 
00025 #include <q3valuelist.h>
00026 #include <qdom.h>
00027 #include <q3valuestack.h>
00028 
00029 #include <kdemacros.h>
00030 
00031 #include "koffice_export.h"
00032 #include <KoXmlReader.h>
00033 
00060 class KOFFICECORE_EXPORT  KoStyleStack
00061 {
00062 public:
00066     KoStyleStack();
00070     KoStyleStack( const char* styleNSURI, const char* foNSURI );
00071     virtual ~KoStyleStack();
00072 
00076     void clear();
00077 
00082     void save();
00083 
00087     void restore();
00088 
00092     void pop();
00093 
00097     void push( const KoXmlElement& style );
00098 
00104     bool hasAttribute( const QString& name, const QString& detail = QString::null ) const KDE_DEPRECATED;
00105 
00110     QString attribute( const QString& name, const QString& detail = QString::null ) const KDE_DEPRECATED;
00111 
00117     bool hasAttributeNS( const char* nsURI, const char* localName, const char* detail = 0 ) const;
00118 
00123     QString attributeNS( const char* nsURI, const char* localName, const char* detail = 0 ) const;
00124 
00128     bool hasChildNode( const QString & name ) const KDE_DEPRECATED;
00129 
00134     KoXmlElement childNode( const QString & name ) const KDE_DEPRECATED;
00135 
00139     bool hasChildNodeNS( const char* nsURI, const char* localName ) const;
00140 
00146     KoXmlElement childNodeNS( const char* nsURI, const char* localName ) const;
00147 
00151     double fontSize() const;
00152 
00159     QString userStyleName( const QString& family ) const;
00160 
00165     QString userStyleDisplayName( const QString& family ) const;
00166 
00174     void setTypeProperties( const char* typeProperties );
00175 
00176 private:
00177     bool isUserStyle( const KoXmlElement& e, const QString& family ) const;
00178 
00179 private:
00181     Q3ValueStack<int> m_marks;
00182 
00187     Q3ValueList<KoXmlElement> m_stack;
00188 
00189     QByteArray m_propertiesTagName;
00190 
00191     const char* m_styleNSURI;
00192     const char* m_foNSURI;
00193 
00194     class KoStyleStackPrivate;
00195     KoStyleStackPrivate *d;
00196 
00197     // forbidden
00198     void operator=( const KoStyleStack& );
00199     KoStyleStack( const KoStyleStack& );
00200 };
00201 
00202 #endif /* KOSTYLESTACK_H */

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