kopete/kopete
#include <kopetechatwindowstylemanager.h>
Public Types | |
enum | StyleInstallStatus { StyleInstallOk = 0, StyleNotValid, StyleNoDirectoryValid, StyleCannotOpen, StyleUnknow } |
Public Slots | |
ChatWindowStyle * | getStyleFromPool (const QString &styleName) |
ChatWindowStyle * | getValidStyleFromPool (const QString &styleName) |
int | installStyle (const QString &styleBundlePath) |
bool | removeStyle (const QString &styleName) |
Signals | |
void | loadStylesFinished () |
Public Member Functions | |
~ChatWindowStyleManager () | |
QStringList | getAvailableStyles () const |
void | loadStyles () |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Static Public Member Functions | |
static ChatWindowStyleManager * | self () |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Additional Inherited Members | |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
Detailed Description
Sigleton class that handle Chat Window styles.
It use style absolute path to avoid unexpected behavior that could happen when using style name.
It can install, delete styles. The styles are managed in a pool, they are only retrieved on demand.
Use getStyleFromPool to retrieve a ChatWindowStyle instance. Do not delete the returned instance, it is handled by this class.
When called the first time, it list all the available styles in $KDEDATADIR/kopete/styles and KDirWatch (via KDirLister) watch for new styles.
If you want to keep a trace of avaiable styles, connect to loadStylesFinished() signal. It is called when KDirLister finish a job(ex: on new directory).
Definition at line 46 of file kopetechatwindowstylemanager.h.
Member Enumeration Documentation
The StyleInstallStatus enum.
It gives better return value for installStyle().
- StyleInstallOk : The install went fine.
- StyleNotValid : The archive didn't contain a valid Chat Window style.
- StyleNoDirectoryValid : It didn't find a suitable directory to install the theme.
- StyleCannotOpen : The archive couldn't be openned.
- StyleUnknow : Unknow error.
Enumerator | |
---|---|
StyleInstallOk | |
StyleNotValid | |
StyleNoDirectoryValid | |
StyleCannotOpen | |
StyleUnknow |
Definition at line 58 of file kopetechatwindowstylemanager.h.
Constructor & Destructor Documentation
ChatWindowStyleManager::~ChatWindowStyleManager | ( | ) |
Destructor.
Definition at line 79 of file kopetechatwindowstylemanager.cpp.
Member Function Documentation
QStringList ChatWindowStyleManager::getAvailableStyles | ( | ) | const |
Get all available styles.
Definition at line 107 of file kopetechatwindowstylemanager.cpp.
|
slot |
Get a instance of a ChatWindowStyle from the pool.
If they are no instance for the specified style, it gets created. DO NOT DELETE the resulting pointer, it is handled by this class.
- Parameters
-
styleName name for the specified style. If style with this name exists in both global and user directories, the user one will be returned
- Returns
- the instance of ChatWindow for the specified style or 0 if valid style wasn't found. DO NOT DELETE IT.
Definition at line 350 of file kopetechatwindowstylemanager.cpp.
|
slot |
Get a instance of a ChatWindowStyle from the pool.
If they are no instance for the specified style, it gets created. If the style doesn't exists or is invalid default style is returned or 0. DO NOT DELETE the resulting pointer, it is handled by this class.
- Parameters
-
styleName name for the specified style. If style with this name exists in both global and user directories, the user one will be returned
- Returns
- the instance of ChatWindow for the specified style or 0 if valid style wasn't found. DO NOT DELETE IT.
Definition at line 324 of file kopetechatwindowstylemanager.cpp.
|
slot |
Install a new style into user style directory Note that you must pass a path to a archive.
- Parameters
-
styleBundlePath Path to the container file to install.
- Returns
- A status code from StyleInstallStatus enum.
Definition at line 112 of file kopetechatwindowstylemanager.cpp.
void ChatWindowStyleManager::loadStyles | ( | ) |
List all availables styles.
Init KDirLister and thus KDirWatch that watch for new styles.
Definition at line 85 of file kopetechatwindowstylemanager.cpp.
|
signal |
This signal is emitted when all styles finished to list.
Used to inform and/or update GUI.
|
slot |
Remove a style from user style directory.
- Parameters
-
styleName the name of the style to remove.
- Returns
- true if the deletion went without problems.
Definition at line 282 of file kopetechatwindowstylemanager.cpp.
|
static |
Singleton access to this class.
- Returns
- the single instance of this class.
Definition at line 66 of file kopetechatwindowstylemanager.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.