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 |
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 |
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 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) |
Protected Attributes | |
KEmoticonsProviderPrivate *const | d |
Additional Inherited Members | |
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) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
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-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:25:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.