lib
KoStyleStack.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
00059 class KOFFICECORE_EXPORT KoStyleStack
00060 {
00061 public:
00065 KoStyleStack();
00069 KoStyleStack( const char* styleNSURI, const char* foNSURI );
00070 virtual ~KoStyleStack();
00071
00075 void clear();
00076
00081 void save();
00082
00086 void restore();
00087
00091 void pop();
00092
00096 void push( const QDomElement& style );
00097
00103 bool hasAttribute( const QString& name, const QString& detail = QString::null ) const KDE_DEPRECATED;
00104
00109 QString attribute( const QString& name, const QString& detail = QString::null ) const KDE_DEPRECATED;
00110
00116 bool hasAttributeNS( const char* nsURI, const char* localName, const char* detail = 0 ) const;
00117
00122 QString attributeNS( const char* nsURI, const char* localName, const char* detail = 0 ) const;
00123
00127 bool hasChildNode( const QString & name ) const KDE_DEPRECATED;
00128
00133 QDomElement childNode( const QString & name ) const KDE_DEPRECATED;
00134
00138 bool hasChildNodeNS( const char* nsURI, const char* localName ) const;
00139
00145 QDomElement childNodeNS( const char* nsURI, const char* localName ) const;
00146
00150 double fontSize() const;
00151
00158 QString userStyleName( const QString& family ) const;
00159
00164 QString userStyleDisplayName( const QString& family ) const;
00165
00173 void setTypeProperties( const char* typeProperties );
00174
00175 private:
00176 bool isUserStyle( const QDomElement& e, const QString& family ) const;
00177
00178 private:
00180 QValueStack<int> m_marks;
00181
00186 QValueList<QDomElement> m_stack;
00187
00188 QCString m_propertiesTagName;
00189
00190 const char* m_styleNSURI;
00191 const char* m_foNSURI;
00192
00193 class KoStyleStackPrivate;
00194 KoStyleStackPrivate *d;
00195
00196
00197 void operator=( const KoStyleStack& );
00198 KoStyleStack( const KoStyleStack& );
00199 };
00200
00201 #endif
|