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

Detailed Description
Generic style collection class, for all "user styles" (see KoUserStyle).To use this for a particular kind of style, derive from KoUserStyle (to add the properties) and derive from KoUserStyleCollection (to add loading, saving, as well as re-defined findStyle and addStyle in order to cast to the correct style class).
Definition at line 32 of file KoUserStyleCollection.h.
Public Member Functions | |
KoUserStyleCollection (const QString &prefix) | |
~KoUserStyleCollection () | |
void | clear () |
bool | isEmpty () const |
int | count () const |
int | indexOf (KoUserStyle *style) const |
QValueList< KoUserStyle * > | styleList () const |
QString | generateUniqueName () const |
QStringList | displayNameList () const |
KoUserStyle * | findStyle (const QString &name, const QString &defaultStyleName) const |
KoUserStyle * | findStyleByDisplayName (const QString &displayName) const |
void | removeStyle (KoUserStyle *style) |
void | updateStyleListOrder (const QStringList &list) |
KoUserStyle * | addStyle (KoUserStyle *sty) |
bool | isDefault () const |
void | setDefault (bool d) |
Protected Member Functions | |
KoUserStyleCollection (const KoUserStyleCollection &rhs) | |
void | operator= (const KoUserStyleCollection &rhs) |
Protected Attributes | |
QValueList< KoUserStyle * > | m_styleList |
Constructor & Destructor Documentation
|
Constructor.
Definition at line 23 of file KoUserStyleCollection.cpp. |
|
Destructor Deletes all styles.
Definition at line 74 of file KoUserStyleCollection.cpp. |
|
forbidden
|
Member Function Documentation
|
Try adding From the moment of this call, the collection owns the style.
Either this succeeds, and
WARNING: Definition at line 99 of file KoUserStyleCollection.cpp. |
|
Erase all styles.
Definition at line 79 of file KoUserStyleCollection.cpp. |
|
Definition at line 60 of file KoUserStyleCollection.h. |
|
Return the list composed of the display-name of each style in the collection.
Definition at line 91 of file KoUserStyleCollection.cpp. |
|
Find style based on the internal name
If the style with that name can't be found, then Definition at line 30 of file KoUserStyleCollection.cpp. |
|
Find style based on the display name There could be 0, 1 or more than 1 style with that name, the method simply returns the first one found, or 0 if none was found. This is mostly useful to detect similar styles when importing styles from another document. Reimplemented in KoStyleCollection. Definition at line 49 of file KoUserStyleCollection.cpp. |
|
Generate a new unique name, to create a style whose internal name differs from the internal name of all existing styles. The prefix passed to the constructor is used here. Definition at line 64 of file KoUserStyleCollection.cpp. |
|
Definition at line 64 of file KoUserStyleCollection.h. |
|
Definition at line 129 of file KoUserStyleCollection.h. |
|
Definition at line 56 of file KoUserStyleCollection.h. |
|
forbidden
|
|
Remove If the style isn't in the collection, nothing happens. The style mustn't be deleted yet; it is stored into a list of styles to delete in clear(). Definition at line 123 of file KoUserStyleCollection.cpp. |
|
Set whether this collection only holds the default styles provided by the application.
Definition at line 133 of file KoUserStyleCollection.h. |
|
Return the list of all styles in the collection.
Definition at line 69 of file KoUserStyleCollection.h. |
|
Reorder the styles in the collection.
Definition at line 132 of file KoUserStyleCollection.cpp. |
The documentation for this class was generated from the following files: