lib

KoStyleCollection Class Reference

#include <KoStyleCollection.h>

Inheritance diagram for KoStyleCollection:

KoUserStyleCollection List of all members.

Detailed Description

TODO rename to KoParagStyleCollection - or should char styles be part of it too?

Definition at line 47 of file KoStyleCollection.h.


Public Member Functions

 KoStyleCollection ()
 ~KoStyleCollection ()
QStringList translatedStyleNames () const
KoParagStyleaddStyle (KoParagStyle *sty)
KoParagStylefindStyle (const QString &name) const
KoParagStylefindStyleByDisplayName (const QString &name) const
KoParagStylestyleAt (int i)
void importStyles (const KoStyleCollection &styleList)
int loadOasisStyles (KoOasisContext &context)
void saveOasis (KoGenStyles &styles, int styleType, KoSavingContext &context) const
void saveOasisOutlineStyles (KoXmlWriter &writer) const
QValueVector< KoParagStyle * > outlineStyles () const
KoParagStyleoutlineStyleForLevel (int level) const
KoParagStylenumberedStyleForLevel (int level) const
KoParagStyledefaultStyle () const
void printDebug () const

Member Function Documentation

KoParagStyle* KoStyleCollection::addStyle ( KoParagStyle sty  )  [inline]

See KoUserStyleCollection::addStyle.

Overloaded for convenience.

Definition at line 62 of file KoStyleCollection.h.

KoParagStyle * KoStyleCollection::defaultStyle (  )  const

Returns:
the "default" format. There isn't really such a notion at the moment (how would the user define it? etc.), and it's usually not needed, except in very specific cases (e.g. in increaseOutlineLevel() for "not a heading") The current implementation is to return Standard or the first one in the collection.

Definition at line 228 of file KoStyleCollection.cpp.

KoParagStyle* KoStyleCollection::findStyle ( const QString &  name  )  const [inline]

Find style based on the internal name name.

Overloaded for convenience.

Definition at line 70 of file KoStyleCollection.h.

KoParagStyle* KoStyleCollection::findStyleByDisplayName ( const QString &  name  )  const [inline]

Find style based on the display name displayName.

Overloaded for convenience.

Reimplemented from KoUserStyleCollection.

Definition at line 78 of file KoStyleCollection.h.

void KoStyleCollection::importStyles ( const KoStyleCollection styleList  ) 

Import a number of styles (e.g. loaded from another document).

Definition at line 138 of file KoStyleCollection.cpp.

int KoStyleCollection::loadOasisStyles ( KoOasisContext context  ) 

Loads the entire style collection, in the OASIS OpenDocument format.

Returns:
the number of new styles loaded

Definition at line 43 of file KoStyleCollection.cpp.

KoParagStyle * KoStyleCollection::numberedStyleForLevel ( int  level  )  const

Returns:
the [first] non-outline numbered style for a given level. Can be 0 if not found.

Definition at line 211 of file KoStyleCollection.cpp.

KoParagStyle * KoStyleCollection::outlineStyleForLevel ( int  level  )  const

Returns:
the [first] outline style for a given level. Can be 0 if not found.

Definition at line 197 of file KoStyleCollection.cpp.

QValueVector< KoParagStyle * > KoStyleCollection::outlineStyles (  )  const

Returns:
the list of outline styles

Definition at line 185 of file KoStyleCollection.cpp.

void KoStyleCollection::saveOasis ( KoGenStyles styles,
int  styleType,
KoSavingContext context 
) const

Save the entire style collection in the OASIS OpenDocument format styleType is the STYLE_* value for this style.

Definition at line 107 of file KoStyleCollection.cpp.

void KoStyleCollection::saveOasisOutlineStyles ( KoXmlWriter writer  )  const

Save the text:outline-style element, mostly for OOo.

Definition at line 166 of file KoStyleCollection.cpp.

KoParagStyle* KoStyleCollection::styleAt ( int  i  )  [inline]

Return style number i.

Definition at line 85 of file KoStyleCollection.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys