class KEmoticonsTheme |
|
This class contains the emoticons theme |
|
|
Copy constructor |
|
Another constructor where you set the KEmoticonsProvider p you should probably never use this, instead use KEmoticons.theme() |
|
Add the emoticon emo with text text
KEmoticonsTheme theme = KEmoticons().theme(); theme.addEmoticon("/path/to/smiley.png", ":) :-)"); 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 |
|
Create a new theme |
|
Returns a QHash that contains the emoticons path as keys and the text as values |
|
Returns the file name of the theme |
|
Check if the theme has a valid provider and it returns true if it can't find it |
|
Load the theme inside the directory path
path - path to the directory |
|
Parse emoticons in text text with ParseMode mode and optionally excluding emoticons from exclude
KEmoticonsTheme theme = KEmoticons().theme(); QString text = ":D hi :)"; QStringList exclude(":)"); QString parsed = theme.parseEmoticons(text, KEmoticonsTheme.DefaultParse, exclude); // parsed will be " text - the text to parse mode - how to parse the text exclude - a list of emoticons to exclude from the parsing Returns the text with emoticons replaced by html images SkipHTML is forced when using this function |
|
Remove the emoticon emo, this will not delete the image file too
KEmoticonsTheme theme = KEmoticons().theme(); theme.removeEmoticon(":)"); emo - the emoticon text to remove Returns true if it can delete the emoticon |
|
Save the emoticon theme |
|
Set the theme name
name - name of the theme |
|
Returns the theme name |
|
Returns the theme path |
|
Tokenize the message message with ParseMode mode
KEmoticonsTheme theme = KEmoticons().theme(); QString text = "hi :)"; QList |
The possible parse modes
DefaultParse | - 0x0 | - | ||
StrictParse | - 0x1 | - | ||
RelaxedParse | - 0x2 | - | ||
SkipHTML | - 0x4 | - |
TokenType, a token might be an image ( emoticon ) or text.
Undefined | - | - | ||
Image | - | - | ||
Text | - | - |