KUtils
#include <kemoticonsprovider.h>
Classes | |
struct | Emoticon |
Public Types | |
enum | AddEmoticonOption { DoNotCopy, Copy } |
Public Member Functions | |
KEmoticonsProvider (QObject *parent=0) | |
virtual | ~KEmoticonsProvider () |
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 |
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 |
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
|
explicit |
Default constructor.
Definition at line 45 of file kemoticonsprovider.cpp.
|
virtual |
Destructor.
Definition at line 50 of file kemoticonsprovider.cpp.
Member Function Documentation
|
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, XmppEmoticons, and PidginEmoticons.
Definition at line 70 of file kemoticonsprovider.cpp.
|
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.
|
protected |
Insert a new item in the emoticons map.
Definition at line 109 of file kemoticonsprovider.cpp.
|
protected |
Clears the emoticons map.
Definition at line 104 of file kemoticonsprovider.cpp.
|
virtual |
Create a new theme.
Reimplemented in AdiumEmoticons, KdeEmoticons, XmppEmoticons, and PidginEmoticons.
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, XmppEmoticons, and PidginEmoticons.
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, XmppEmoticons, and PidginEmoticons.
Definition at line 64 of file kemoticonsprovider.cpp.
|
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.
|
protected |
Remove an item from the emoticons map.
Definition at line 116 of file kemoticonsprovider.cpp.
|
virtual |
Save the emoticon theme.
Reimplemented in AdiumEmoticons, KdeEmoticons, XmppEmoticons, and PidginEmoticons.
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
|
protected |
Private class.
Definition at line 164 of file kemoticonsprovider.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:35 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.