KUtils
KEmoticonsProvider Class Reference
This is the base class for the emoticons provider plugins. More...
#include <kemoticonsprovider.h>

Classes | |
struct | Emoticon |
Public Types | |
enum | AddEmoticonOption { DoNotCopy, Copy } |
Public Member Functions | |
virtual bool | addEmoticon (const QString &emo, const QString &text, AddEmoticonOption option=DoNotCopy) |
virtual void | createNew () |
QHash< QChar, QList< Emoticon > > | emoticonsIndex () const |
QHash< QString, QStringList > | emoticonsMap () const |
QString | fileName () const |
KEmoticonsProvider (QObject *parent=0) | |
virtual bool | loadTheme (const QString &path) |
virtual bool | removeEmoticon (const QString &emo) |
virtual void | save () |
void | setThemeName (const QString &name) |
QString | themeName () const |
QString | themePath () const |
virtual | ~KEmoticonsProvider () |
Protected Member Functions | |
void | addEmoticonIndex (const QString &path, const QStringList &emoList) |
void | addEmoticonsMap (QString key, QStringList value) |
void | clearEmoticonsMap () |
void | removeEmoticonIndex (const QString &path, const QStringList &emoList) |
void | removeEmoticonsMap (QString key) |
Protected Attributes | |
KEmoticonsProviderPrivate *const | d |
Detailed Description
This is the base class for the emoticons provider plugins.
Definition at line 35 of file kemoticonsprovider.h.
Member Enumeration Documentation
Options to pass to addEmoticon.
- Enumerator:
DoNotCopy < Don't copy the emoticon file into the theme directory
Copy < Copy the emoticon file into the theme directory
Definition at line 53 of file kemoticonsprovider.h.
Constructor & Destructor Documentation
KEmoticonsProvider::KEmoticonsProvider | ( | QObject * | parent = 0 |
) | [explicit] |
Default constructor.
Definition at line 45 of file kemoticonsprovider.cpp.
KEmoticonsProvider::~KEmoticonsProvider | ( | ) | [virtual] |
Destructor.
Definition at line 50 of file kemoticonsprovider.cpp.
Member Function Documentation
bool KEmoticonsProvider::addEmoticon | ( | const QString & | emo, | |
const QString & | text, | |||
AddEmoticonOption | option = DoNotCopy | |||
) | [virtual] |
Add the emoticon emo
with text text
.
- Parameters:
-
emo path to the emoticon image text the text of the emoticon separated by space for multiple text copy whether or not copy emo
into the theme directory
- Returns:
true
if it can add the emoticon
Reimplemented in AdiumEmoticons, KdeEmoticons, PidginEmoticons, and XmppEmoticons.
Definition at line 70 of file kemoticonsprovider.cpp.
void KEmoticonsProvider::addEmoticonIndex | ( | const QString & | path, | |
const QStringList & | emoList | |||
) | [protected] |
Add an emoticon to the index.
- Parameters:
-
path path to the emoticon emoList list of text associated with this emoticon
Definition at line 135 of file kemoticonsprovider.cpp.
void KEmoticonsProvider::addEmoticonsMap | ( | QString | key, | |
QStringList | value | |||
) | [protected] |
Insert a new item in the emoticons map.
Definition at line 109 of file kemoticonsprovider.cpp.
void KEmoticonsProvider::clearEmoticonsMap | ( | ) | [protected] |
Clears the emoticons map.
Definition at line 104 of file kemoticonsprovider.cpp.
void KEmoticonsProvider::createNew | ( | ) | [virtual] |
Create a new theme.
Reimplemented in AdiumEmoticons, KdeEmoticons, PidginEmoticons, and XmppEmoticons.
Definition at line 126 of file kemoticonsprovider.cpp.
QHash< QChar, QList< KEmoticonsProvider::Emoticon > > KEmoticonsProvider::emoticonsIndex | ( | ) | const |
Returns a QHash that contains emoticons indexed by the first char.
Definition at line 130 of file kemoticonsprovider.cpp.
QHash< QString, QStringList > KEmoticonsProvider::emoticonsMap | ( | ) | const |
Returns a QHash that contains the emoticons path as keys and the text as values.
Definition at line 121 of file kemoticonsprovider.cpp.
QString KEmoticonsProvider::fileName | ( | ) | const |
Returns the file name of the theme.
Definition at line 99 of file kemoticonsprovider.cpp.
Load the theme inside the directory path
.
- Parameters:
-
path path to the directory
Reimplemented in AdiumEmoticons, KdeEmoticons, PidginEmoticons, and XmppEmoticons.
Definition at line 55 of file kemoticonsprovider.cpp.
Remove the emoticon emo
, this will not delete the image file too.
- Parameters:
-
emo the emoticon text to remove
- Returns:
true
if it can delete the emoticon
Reimplemented in AdiumEmoticons, KdeEmoticons, PidginEmoticons, and XmppEmoticons.
Definition at line 64 of file kemoticonsprovider.cpp.
void KEmoticonsProvider::removeEmoticonIndex | ( | const QString & | path, | |
const QStringList & | emoList | |||
) | [protected] |
Remove an emoticon from the index.
- Parameters:
-
path path to the emoticon emoList list of text associated with this emoticon
Definition at line 158 of file kemoticonsprovider.cpp.
void KEmoticonsProvider::removeEmoticonsMap | ( | QString | key | ) | [protected] |
Remove an item from the emoticons map.
Definition at line 116 of file kemoticonsprovider.cpp.
void KEmoticonsProvider::save | ( | ) | [virtual] |
Save the emoticon theme.
Reimplemented in AdiumEmoticons, KdeEmoticons, PidginEmoticons, and XmppEmoticons.
Definition at line 80 of file kemoticonsprovider.cpp.
void KEmoticonsProvider::setThemeName | ( | const QString & | name | ) |
Set the theme name.
- Parameters:
-
name name of the theme
Definition at line 89 of file kemoticonsprovider.cpp.
QString KEmoticonsProvider::themeName | ( | ) | const |
Returns the theme name.
Definition at line 84 of file kemoticonsprovider.cpp.
QString KEmoticonsProvider::themePath | ( | ) | const |
Returns the theme path.
Definition at line 94 of file kemoticonsprovider.cpp.
Member Data Documentation
KEmoticonsProviderPrivate* const KEmoticonsProvider::d [protected] |
Private class.
Definition at line 164 of file kemoticonsprovider.h.
The documentation for this class was generated from the following files: