F:/KPlato/koffice/libs/kotext/KoParagStyle.h

Aller à la documentation de ce fichier.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2001-2005 David Faure <faure@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License version 2 as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, USA.
00017 */
00018 
00019 #ifndef KOPARAGSTYLE_H
00020 #define KOPARAGSTYLE_H
00021 
00022 #include "KoTextFormat.h"
00023 #include "KoParagLayout.h"
00024 #include "KoUserStyle.h"
00025 class KoGenStyles;
00026 class QDomElement;
00027 
00032 class KOTEXT_EXPORT KoCharStyle : public KoUserStyle
00033 {
00034 public:
00036     KoCharStyle( const QString & name );
00037 
00039     KoCharStyle( const KoCharStyle & rhs ) : KoUserStyle( QString::null ) { *this = rhs; }
00040 
00043     const KoTextFormat & format() const;
00044     KoTextFormat & format();
00045 
00046 protected:
00047     KoTextFormat m_format;
00048 };
00049 
00054 class KOTEXT_EXPORT KoParagStyle : public KoCharStyle
00055 {
00056 public:
00058     KoParagStyle( const QString & name );
00059 
00061     KoParagStyle( const KoParagStyle & rhs );
00062 
00063     ~KoParagStyle();
00064 
00065     void operator=( const KoParagStyle & );
00066 
00067 
00068     const KoParagLayout & paragLayout() const;
00069     KoParagLayout & paragLayout();
00070 
00071     KoParagStyle *followingStyle() const { return m_followingStyle; }
00072     void setFollowingStyle( KoParagStyle *fst );
00073 
00076     void saveStyle( QDomElement & parentElem );
00079     void loadStyle( QDomElement & parentElem, int docVersion = 2 );
00080 
00082     void loadStyle( QDomElement & styleElem, KoOasisContext& context );
00085     QString saveStyle( KoGenStyles& genStyles, int styleType, const QString& parentStyleName, KoSavingContext& context ) const;
00086 
00087     KoParagStyle * parentStyle() const {return m_parentStyle;}
00088     void setParentStyle( KoParagStyle *_style){ m_parentStyle = _style;}
00089 
00090     int inheritedParagLayoutFlag() const { return m_inheritedParagLayoutFlag; }
00091     int inheritedFormatFlag() const { return m_inheritedFormatFlag; }
00092 
00093     void propagateChanges( int paragLayoutFlag, int formatFlag );
00094 
00095     // If true, paragraphs with this style will be included in the table of contents
00096     bool isOutline() const { return m_bOutline; }
00097     void setOutline( bool b );
00098 
00099 private:
00100     KoParagLayout m_paragLayout;
00101     KoParagStyle *m_followingStyle;
00102     KoParagStyle *m_parentStyle;
00103     int m_inheritedParagLayoutFlag;
00104     int m_inheritedFormatFlag;
00105     bool m_bOutline;
00106 };
00107 
00108 #endif /* KOPARAGSTYLE_H */
00109 

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