![]() |
LeechCraft Azoth
0.6.70-15082-g543737046d
Modular multiprotocol IM plugin for LeechCraft
|
Interface for smile resource loaders. More...
#include "iresourceplugin.h"
Public Member Functions | |
virtual | ~IEmoticonResourceSource () |
virtual QSet< QString > | GetEmoticonStrings (const QString &pack) const =0 |
Returns the strings that are replaceable with emoticons in the given pack. More... | |
virtual QHash< QImage, QString > | GetReprImages (const QString &pack) const =0 |
Returns emoticons and their string representations from the given emoticon pack. More... | |
virtual QByteArray | GetImage (const QString &pack, const QString &string) const =0 |
Returns the data corresponding to the given smile. More... | |
![]() | |
virtual | ~IResourceSource () |
virtual QAbstractItemModel * | GetOptionsModel () const =0 |
Returns the model with the options for resource. More... | |
Interface for smile resource loaders.
This interface should be used for resource sources that deal with loading different emoticon packs. For example, plugins that enable loading of Psi-style or QIP-style emoticon packs would return objects implementing this interface from the corresponding IResourcePlugin::GetResourceSources() method.
Definition at line 67 of file iresourceplugin.h.
|
inlinevirtual |
Definition at line 70 of file iresourceplugin.h.
|
pure virtual |
Returns the strings that are replaceable with emoticons in the given pack.
This function is used to obtain the list of strings that could be replaced by an emoticonin the given emoticon pack. This function should return all possible variants for each emoticon, for example, ":)", ":-)" and "(:" for the same icon.
[in] | pack | The emoticon pack to query, which is one of items returned from GetOptionsModel(). |
|
pure virtual |
Returns the data corresponding to the given smile.
Please note that this data most likely shouldn't be a serialized (or saved) QImage or QPixmap. Instead, unmodified contents of the corresponding file should be returned, since the image may contain animation, and conversion to QImage or QPixmap wouldn't preserve it.
The returned byte array most likely should be just a result of QIODevice::readAll(), and it will be inserted into corresponding place via the data URI scheme.
[in] | pack | The smile pack to use, which is one of items returned from GetOptionsModel(). |
[in] | string | The string corresponding to the smile, which is one of strings in GetSmileStrings() for the same pack. |
|
pure virtual |
Returns emoticons and their string representations from the given emoticon pack.
The returned map should contain all the smiles present in the pack and their string representations — that is, the string that the smile should be replaced with. Obviously, string representation should be present in GetSmileStrings(), and GetImage() should return the corresponding smile for it.
[in] | pack | The smile pack to query, which is one of items returned from GetOptionsModel(). |