lib Library API Documentation

koStyleStack.h

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., 59 Temple Place - Suite 330,
00018    Boston, MA 02111-1307, USA.
00019 */
00020 
00021 #ifndef KOSTYLESTACK_H
00022 #define KOSTYLESTACK_H
00023 
00024 
00025 #include <qvaluelist.h>
00026 #include <qdom.h>
00027 #include <qvaluestack.h>
00028 
00029 #include <kdemacros.h>
00030 
00031 #include "koffice_export.h"
00032 
00055 class KOFFICECORE_EXPORT  KoStyleStack
00056 {
00057 public:
00061     KoStyleStack();
00065     KoStyleStack( const char* styleNSURI, const char* foNSURI );
00066     virtual ~KoStyleStack();
00067 
00071     void clear();
00072 
00077     void save();
00078 
00082     void restore();
00083 
00087     void pop();
00088 
00092     void push( const QDomElement& style );
00093 
00099     bool hasAttribute( const QString& name, const QString& detail = QString::null ) const KDE_DEPRECATED;
00100 
00105     QString attribute( const QString& name, const QString& detail = QString::null ) const KDE_DEPRECATED;
00106 
00112     bool hasAttributeNS( const char* nsURI, const char* localName, const char* detail = 0 ) const;
00113 
00118     QString attributeNS( const char* nsURI, const char* localName, const char* detail = 0 ) const;
00119 
00123     bool hasChildNode( const QString & name ) const KDE_DEPRECATED;
00124 
00129     QDomElement childNode( const QString & name ) const KDE_DEPRECATED;
00130 
00134     bool hasChildNodeNS( const char* nsURI, const char* localName ) const;
00135 
00141     QDomElement childNodeNS( const char* nsURI, const char* localName ) const;
00142 
00146     double fontSize() const;
00147 
00152     QString userStyleName() const;
00153 
00158     QString userStyleDisplayName() const;
00159 
00167     void setTypeProperties( const char* typeProperties );
00168 
00169 private:
00170     bool isUserStyle( const QDomElement& e ) const;
00171 
00172 private:
00174     QValueStack<int> m_marks;
00175 
00180     QValueList<QDomElement> m_stack;
00181 
00182     QCString m_propertiesTagName;
00183 
00184     const char* m_styleNSURI;
00185     const char* m_foNSURI;
00186 
00187     class KoStyleStackPrivate;
00188     KoStyleStackPrivate *d;
00189 
00190     // forbidden
00191     void operator=( const KoStyleStack& );
00192     KoStyleStack( const KoStyleStack& );
00193 };
00194 
00195 #endif /* KOSTYLESTACK_H */
KDE Logo
This file is part of the documentation for lib Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:40:07 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003