LeechCraft Azoth
0.6.70-18450-gabe19ee3b0
Modular multiprotocol IM plugin for LeechCraft
Toggle main menu visibility
Loading...
Searching...
No Matches
iresourceplugin.h
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#ifndef PLUGINS_AZOTH_INTERFACES_IRESOURCEPLUGIN_H
10
#define PLUGINS_AZOTH_INTERFACES_IRESOURCEPLUGIN_H
11
#include <QtGlobal>
12
#include <QStringList>
13
#include <QMap>
14
#include <QImage>
15
16
class
QAbstractItemModel;
17
18
inline
uint
qHash
(
const
QImage& image)
19
{
20
return
image.cacheKey ();
21
}
22
23
namespace
LC
24
{
25
namespace
Azoth
26
{
37
class
IResourceSource
38
{
39
public
:
40
virtual
~IResourceSource
() {}
41
56
virtual
QAbstractItemModel*
GetOptionsModel
()
const
= 0;
57
};
58
67
class
IEmoticonResourceSource
:
virtual
public
IResourceSource
68
{
69
public
:
70
virtual
~IEmoticonResourceSource
() {}
71
87
virtual
QSet<QString>
GetEmoticonStrings
(
const
QString& pack)
const
= 0;
88
104
virtual
QList<QPair<QImage, QString>
>
GetReprImages
(
const
QString& pack)
const
= 0;
105
128
virtual
QByteArray
GetImage
(
const
QString& pack,
const
QString&
string
)
const
= 0;
129
};
130
144
class
IResourcePlugin
145
{
146
public
:
147
virtual
~IResourcePlugin
() {}
148
159
virtual
QList<QObject*>
GetResourceSources
()
const
= 0;
160
};
161
}
162
}
163
164
Q_DECLARE_INTERFACE (
LC::Azoth::IEmoticonResourceSource
,
165
"org.Deviant.LeechCraft.Azoth.IEmoticonResourceSource/1.0"
)
166
Q_DECLARE_INTERFACE (
LC
::Azoth::IResourcePlugin,
167
"org.Deviant.LeechCraft.Azoth.IResourcePlugin/1.0"
)
168
169
#endif
LC::Azoth::IEmoticonResourceSource
Interface for smile resource loaders.
Definition
iresourceplugin.h:68
LC::Azoth::IEmoticonResourceSource::GetReprImages
virtual QList< QPair< QImage, QString > > GetReprImages(const QString &pack) const =0
Returns emoticons and their string representations from the given emoticon pack.
LC::Azoth::IEmoticonResourceSource::GetEmoticonStrings
virtual QSet< QString > GetEmoticonStrings(const QString &pack) const =0
Returns the strings that are replaceable with emoticons in the given pack.
LC::Azoth::IEmoticonResourceSource::GetImage
virtual QByteArray GetImage(const QString &pack, const QString &string) const =0
Returns the data corresponding to the given smile.
LC::Azoth::IEmoticonResourceSource::~IEmoticonResourceSource
virtual ~IEmoticonResourceSource()
Definition
iresourceplugin.h:70
LC::Azoth::IResourcePlugin
Interface for plugins having resource sources, like smile support or chat window styles.
Definition
iresourceplugin.h:145
LC::Azoth::IResourcePlugin::GetResourceSources
virtual QList< QObject * > GetResourceSources() const =0
Returns the resource sources that this plugin provides.
LC::Azoth::IResourcePlugin::~IResourcePlugin
virtual ~IResourcePlugin()
Definition
iresourceplugin.h:147
LC::Azoth::IResourceSource
Base interface for specific resource sources.
Definition
iresourceplugin.h:38
LC::Azoth::IResourceSource::~IResourceSource
virtual ~IResourceSource()
Definition
iresourceplugin.h:40
LC::Azoth::IResourceSource::GetOptionsModel
virtual QAbstractItemModel * GetOptionsModel() const =0
Returns the model with the options for resource.
QList
Definition
iaccountactionsprovider.h:16
qHash
uint qHash(const QImage &image)
Definition
iresourceplugin.h:18
LC::Azoth
Definition
activityinfo.h:16
LC
Definition
activityinfo.h:14
src
plugins
azoth
interfaces
azoth
iresourceplugin.h
Generated by
1.17.0