Logo Search packages:      
Sourcecode: kmess version File versions  Download package

Emoticon Class Reference
[main]

#include <emoticon.h>

List of all members.


Detailed Description

Data class for an emoticon definition.

This class represents an emoticon picture file along with the text shortcuts that translate into that picture. Normal emoticon pictures are searched for in two folders: first in the one where is located the theme selected by the user; then in the other where there's the default KMess theme. This way, if an emoticon is not present in a theme that the user has chosen, the standard KMess emoticon is kept in its place. A common emoticon which most themes don't have is the 'party' one, which in MSN is a smiley with a party hat on it. You'll often see the KMess default version of this emoticon when you choose another theme.

But the emoticons can also be created with a specific path where to look for the image file; a method useful for custom emoticons. They don't have a default icon in the default KMess theme, so no defaults are searched for.

For standard emoticons, file paths are updated by the EmoticonTheme class when the theme changes.

Multiple emoticon shortcuts can be added to the emoticon with the addShortcut() method. KMess supports for the emoticons all the image file types which are supported by KDE; but only some extensions are looked for. If you want to add another image type for your emoticons, look at the updatePath() method.

Author:
Mike K. Bennett

Definition at line 72 of file emoticon.h.


Signals

void changed ()

Public Member Functions

void addShortcut (const QString &shortcut)
 Emoticon (const Emoticon &other)
 Emoticon (const QString &pictureName, const QString &tooltip, const QString &pictureDirectory)
 Emoticon (const QString &pictureName, const QString &tooltip)
const QString & getDataHash () const
QString getHtml (bool isSmall) const
QString getPattern () const
const QString & getPictureName () const
const QString & getPicturePath () const
QString getShortcut () const
const QStringList & getShortcuts () const
QString getTooltip () const
bool isValid () const
void setPictureName (const QString &pictureName)
void setShortcut (const QString &shortcut)
void setShortcuts (const QStringList &shortcuts)
void setTooltip (const QString &pictureTooltip)
void update ()
virtual ~Emoticon ()

Static Public Member Functions

static bool isValidShortcut (const QString &shortcut)

Private Attributes

QString dataHash_
int height_
bool isCustomEmoticon_
QString originalPictureName_
QString pictureDirectory_
QString pictureName_
QString picturePath_
QStringList shortcuts_
QString tooltip_
bool valid_
int width_

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

Generated by  Doxygen 1.6.0   Back to index