lib

KoStyleCollection Class Reference

#include <KoStyleCollection.h>

Inheritance diagram for KoStyleCollection:
KoUserStyleCollection

Public Member Functions

TQStringList translatedStyleNames () const
 
KoParagStyle * addStyle (KoParagStyle *sty)
 
KoParagStyle * findStyle (const TQString &name) const
 
KoParagStyle * findStyleByDisplayName (const TQString &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
 
TQValueVector< KoParagStyle * > outlineStyles () const
 
KoParagStyle * outlineStyleForLevel (int level) const
 
KoParagStyle * numberedStyleForLevel (int level) const
 
KoParagStyle * defaultStyle () const
 
void printDebug () const
 
- Public Member Functions inherited from KoUserStyleCollection
 KoUserStyleCollection (const TQString &prefix)
 
 ~KoUserStyleCollection ()
 
void clear ()
 
bool isEmpty () const
 
int count () const
 
int indexOf (KoUserStyle *style) const
 
TQValueList< KoUserStyle * > styleList () const
 
TQString generateUniqueName () const
 
TQStringList displayNameList () const
 
KoUserStyle * findStyle (const TQString &name, const TQString &defaultStyleName) const
 
KoUserStyle * findStyleByDisplayName (const TQString &displayName) const
 
void removeStyle (KoUserStyle *style)
 
void updateStyleListOrder (const TQStringList &list)
 
KoUserStyle * addStyle (KoUserStyle *sty)
 
bool isDefault () const
 
void setDefault (bool d)
 

Additional Inherited Members

- Protected Member Functions inherited from KoUserStyleCollection
 KoUserStyleCollection (const KoUserStyleCollection &rhs)
 
void operator= (const KoUserStyleCollection &rhs)
 
- Protected Attributes inherited from KoUserStyleCollection
TQValueList< KoUserStyle * > m_styleList
 

Detailed Description

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

Definition at line 47 of file KoStyleCollection.h.

Constructor & Destructor Documentation

◆ KoStyleCollection()

KoStyleCollection::KoStyleCollection ( )

Definition at line 34 of file KoStyleCollection.cpp.

◆ ~KoStyleCollection()

KoStyleCollection::~KoStyleCollection ( )

Definition at line 39 of file KoStyleCollection.cpp.

Member Function Documentation

◆ addStyle()

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

See KoUserStyleCollection::addStyle.

Overloaded for convenience.

Definition at line 62 of file KoStyleCollection.h.

◆ defaultStyle()

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.

◆ findStyle()

KoParagStyle * KoStyleCollection::findStyle ( const TQString &  name) const
inline

Find style based on the internal name name.

Overloaded for convenience.

Definition at line 70 of file KoStyleCollection.h.

◆ findStyleByDisplayName()

KoParagStyle * KoStyleCollection::findStyleByDisplayName ( const TQString &  name) const
inline

Find style based on the display name displayName.

Overloaded for convenience.

Definition at line 78 of file KoStyleCollection.h.

◆ importStyles()

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.

◆ loadOasisStyles()

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.

◆ numberedStyleForLevel()

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.

◆ outlineStyleForLevel()

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.

◆ outlineStyles()

TQValueVector< KoParagStyle * > KoStyleCollection::outlineStyles ( ) const
Returns
the list of outline styles

Definition at line 185 of file KoStyleCollection.cpp.

◆ printDebug()

void KoStyleCollection::printDebug ( ) const

Definition at line 234 of file KoStyleCollection.cpp.

◆ saveOasis()

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.

◆ saveOasisOutlineStyles()

void KoStyleCollection::saveOasisOutlineStyles ( KoXmlWriter &  writer) const

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

Definition at line 166 of file KoStyleCollection.cpp.

◆ styleAt()

KoParagStyle * KoStyleCollection::styleAt ( int  i)
inline

Return style number i.

Definition at line 85 of file KoStyleCollection.h.

◆ translatedStyleNames()

TQStringList KoStyleCollection::translatedStyleNames ( ) const
inline

Definition at line 56 of file KoStyleCollection.h.


The documentation for this class was generated from the following files: