KEmoticons 5.109.0
|
This class contains the emoticons theme. More...
#include <kemoticonstheme.h>
Classes | |
struct | Token |
A token consists of a QString text which is either a regular text or a path to image depending on the type. More... | |
Public Types | |
typedef QFlags< ParseModeEnum > | ParseMode |
enum | ParseModeEnum { DefaultParse = 0x0 , StrictParse = 0x1 , RelaxedParse = 0x2 , SkipHTML = 0x4 } |
The possible parse modes. More... | |
enum | TokenType { Undefined , Image , Text } |
TokenType, a token might be an image ( emoticon ) or text. More... | |
Public Member Functions | |
KEmoticonsTheme () | |
Default constructor, it creates a null emoticon theme You should probably never use this, use KEmoticons::theme() instead. | |
KEmoticonsTheme (const KEmoticonsTheme &ket) | |
Copy constructor. | |
KEmoticonsTheme (KEmoticonsProvider *p) | |
Another constructor where you set the KEmoticonsProvider p You should probably never use this, use KEmoticons::theme() instead. | |
~KEmoticonsTheme () | |
Destructor. | |
QHash< QString, QStringList > | emoticonsMap () const |
Returns a QHash that contains the emoticon path as keys and the text as values. | |
QString | fileName () const |
Returns the file name of the emoticon theme. | |
bool | isNull () const |
Checks if the emoticon theme has a valid provider. | |
KEmoticonsTheme & | operator= (const KEmoticonsTheme &ket) |
QString | parseEmoticons (const QString &text, ParseMode mode=DefaultParse, const QStringList &exclude=QStringList()) const |
Parses emoticons in text text with ParseMode mode and optionally excluding emoticons from exclude . | |
void | setThemeName (const QString &name) |
Sets the emoticon theme name. | |
QString | themeName () const |
Returns the theme name. | |
QString | themePath () const |
Returns the emoticon theme path. | |
QList< Token > | tokenize (const QString &message, ParseMode mode=DefaultParse) const |
Tokenizes the message message with ParseMode mode . | |
This class contains the emoticons theme.
KEmoticonsTheme::KEmoticonsTheme | ( | ) |
Default constructor, it creates a null emoticon theme You should probably never use this, use KEmoticons::theme() instead.
KEmoticonsTheme::KEmoticonsTheme | ( | const KEmoticonsTheme & | ket | ) |
Copy constructor.
KEmoticonsTheme::KEmoticonsTheme | ( | KEmoticonsProvider * | p | ) |
Another constructor where you set the KEmoticonsProvider p
You should probably never use this, use KEmoticons::theme() instead.
KEmoticonsTheme::~KEmoticonsTheme | ( | ) |
Destructor.
QHash< QString, QStringList > KEmoticonsTheme::emoticonsMap | ( | ) | const |
Returns a QHash that contains the emoticon path as keys and the text as values.
QString KEmoticonsTheme::fileName | ( | ) | const |
Returns the file name of the emoticon theme.
bool KEmoticonsTheme::isNull | ( | ) | const |
Checks if the emoticon theme has a valid provider.
QString KEmoticonsTheme::parseEmoticons | ( | const QString & | text, |
ParseMode | mode = DefaultParse , |
||
const QStringList & | exclude = QStringList() |
||
) | const |
Parses emoticons in text text
with ParseMode mode
and optionally excluding emoticons from exclude
.
text | the text to parse |
mode | how to parse the text |
exclude | a list of emoticons to exclude from the parsing |
void KEmoticonsTheme::setThemeName | ( | const QString & | name | ) |
Sets the emoticon theme name.
name | name of the theme |
QString KEmoticonsTheme::themeName | ( | ) | const |
Returns the theme name.
QString KEmoticonsTheme::themePath | ( | ) | const |
Returns the emoticon theme path.
QList< Token > KEmoticonsTheme::tokenize | ( | const QString & | message, |
ParseMode | mode = DefaultParse |
||
) | const |
Tokenizes the message message
with ParseMode mode
.