• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kopete/kopete

ChatWindowStyleManager Class Reference

#include <kopetechatwindowstylemanager.h>

Inheritance diagram for ChatWindowStyleManager:

Inheritance graph
[legend]

List of all members.


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).

Author:
Michaƫl Larouche <larouche@kde.org>

Definition at line 46 of file kopetechatwindowstylemanager.h.


Public Types

enum  StyleInstallStatus {
  StyleInstallOk = 0, StyleNotValid, StyleNoDirectoryValid, StyleCannotOpen,
  StyleUnknow
}

Public Slots

int installStyle (const QString &styleBundlePath)
bool removeStyle (const QString &styleName)
ChatWindowStyle * getStyleFromPool (const QString &styleName)

Signals

void loadStylesFinished ()

Public Member Functions

 ~ChatWindowStyleManager ()
void loadStyles ()
QStringList getAvailableStyles () const

Static Public Member Functions

static ChatWindowStyleManager * self ()

Member Enumeration Documentation

enum ChatWindowStyleManager::StyleInstallStatus

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

ChatWindowStyleManager * ChatWindowStyleManager::self (  )  [static]

Singleton access to this class.

Returns:
the single instance of this class.

Definition at line 66 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.

QStringList ChatWindowStyleManager::getAvailableStyles (  )  const

Get all available styles.

Definition at line 104 of file kopetechatwindowstylemanager.cpp.

int ChatWindowStyleManager::installStyle ( const QString &  styleBundlePath  )  [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 109 of file kopetechatwindowstylemanager.cpp.

bool ChatWindowStyleManager::removeStyle ( const QString &  styleName  )  [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 279 of file kopetechatwindowstylemanager.cpp.

ChatWindowStyle * ChatWindowStyleManager::getStyleFromPool ( const QString &  styleName  )  [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. DO NOT DELETE IT.

Definition at line 321 of file kopetechatwindowstylemanager.cpp.

void ChatWindowStyleManager::loadStylesFinished (  )  [signal]

This signal is emitted when all styles finished to list.

Used to inform and/or update GUI.


The documentation for this class was generated from the following files:
  • kopetechatwindowstylemanager.h
  • kopetechatwindowstylemanager.cpp

kopete/kopete

Skip menu "kopete/kopete"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal