KUtils
kemoticonstheme.cpp
Go to the documentation of this file.
91 bool KEmoticonsTheme::addEmoticon(const QString &emo, const QString &text, KEmoticonsProvider::AddEmoticonOption option)
163 QString KEmoticonsTheme::parseEmoticons(const QString &text, ParseMode mode, const QStringList &exclude) const
191 bool EmoticonCompareEscaped( const KEmoticonsProvider::Emoticon &s1, const KEmoticonsProvider::Emoticon &s2)
195 bool EmoticonCompare( const KEmoticonsProvider::Emoticon &s1, const KEmoticonsProvider::Emoticon &s2)
201 QList<KEmoticonsTheme::Token> KEmoticonsTheme::tokenize(const QString &message, ParseMode mode) const
347 result.append(Token(Image, itFound.first.matchTextEscaped, itFound.first.picPath, itFound.first.picHTMLCode));
350 result.append(Token(Image, itFound.first.matchTextEscaped, itFound.first.picPath, itFound.first.picHTMLCode));
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
bool removeEmoticon(const QString &emo)
Remove the emoticon emo, this will not delete the image file too.
Definition: kemoticonstheme.cpp:82
const T & at(int i) const
QString matchTextEscaped
Definition: kemoticonsprovider.h:45
bool contains(const QString &str, Qt::CaseSensitivity cs) const
This is the base class for the emoticons provider plugins.
Definition: kemoticonsprovider.h:35
QHash< QString, QStringList > emoticonsMap() const
Returns a QHash that contains the emoticons path as keys and the text as values.
Definition: kemoticonstheme.cpp:145
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
static KEmoticonsTheme::ParseMode parseMode()
Returns the current parse mode.
Definition: kemoticons.cpp:291
Parse mode where all possible emoticon matches are allowed.
Definition: kemoticonstheme.h:44
int size() const
bool EmoticonCompare(const KEmoticonsProvider::Emoticon &s1, const KEmoticonsProvider::Emoticon &s2)
Definition: kemoticonstheme.cpp:195
void append(const T &value)
bool isNull() const
Check if the theme has a valid provider and it returns true if it can't find it.
Definition: kemoticonstheme.cpp:362
bool isSpace() const
KEmoticonsTheme()
Default constructor, it creates a null emoticons theme you should probably never use this...
Definition: kemoticonstheme.cpp:53
bool isEmpty() const
bool isEmpty() const
QString parseEmoticons(const QString &text, ParseMode mode=DefaultParse, const QStringList &exclude=QStringList()) const
Parse emoticons in text text with ParseMode mode and optionally excluding emoticons from exclude...
Definition: kemoticonstheme.cpp:163
bool loadTheme(const QString &path)
Load the theme inside the directory path.
Definition: kemoticonstheme.cpp:73
QList< Token > tokenize(const QString &message, ParseMode mode=DefaultParse) const
Tokenize the message message with ParseMode mode.
Definition: kemoticonstheme.cpp:201
Definition: dialog.h:29
bool isNull() const
iterator end()
KEmoticonsTheme & operator=(const KEmoticonsTheme &ket)
Definition: kemoticonstheme.cpp:367
QString mid(int position, int n) const
A token consists of a QString text which is either a regular text or a path to image depending on the...
Definition: kemoticonstheme.h:65
Strict parsing requires a space between each emoticon.
Definition: kemoticonstheme.h:43
bool addEmoticon(const QString &emo, const QString &text, KEmoticonsProvider::AddEmoticonOption option=KEmoticonsProvider::DoNotCopy)
Add the emoticon emo with text text.
Definition: kemoticonstheme.cpp:91
bool EmoticonCompareEscaped(const KEmoticonsProvider::Emoticon &s1, const KEmoticonsProvider::Emoticon &s2)
Definition: kemoticonstheme.cpp:191
int length() const
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
const_iterator constEnd() const
const_iterator constBegin() const
iterator begin()
This file is part of the KDE documentation.
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
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.