lib
KoStyleCollection Class Reference
#include <KoStyleCollection.h>
Inheritance diagram for KoStyleCollection:

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 |
KoParagStyle * | addStyle (KoParagStyle *sty) |
KoParagStyle * | findStyle (const QString &name) const |
KoParagStyle * | findStyleByDisplayName (const QString &name) const |
KoParagStyle * | styleAt (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 |
KoParagStyle * | outlineStyleForLevel (int level) const |
KoParagStyle * | numberedStyleForLevel (int level) const |
KoParagStyle * | defaultStyle () 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 |
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] |
The documentation for this class was generated from the following files: