LeechCraft 0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
iimgsource.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#pragma once
10
11#include <QtPlugin>
12#include <QUrl>
13#include <QString>
14#include <QList>
15#include <QSize>
16
17namespace LC
18{
25 {
28 QByteArray ID_;
29
32 QString Name_;
33 };
34
38
42 {
45 QUrl Full_;
46
49 QSize FullSize_;
50
55
60
67 QUrl Thumb_;
68
73
76 QString Title_;
77 };
78
82}
83
94{
95public:
97
105 virtual QObject* GetQObject () = 0;
106
114 virtual LC::RemoteImageInfos_t GetInfos () const = 0;
115protected:
125 virtual void ready () = 0;
126
137 virtual void error (const QString& text) = 0;
138};
139
147{
148public:
149 virtual ~IImgSource () {}
150
158
175 virtual IPendingImgSourceRequest* RequestImages (const QByteArray& serviceId) = 0;
176
189};
190
191Q_DECLARE_INTERFACE (IPendingImgSourceRequest, "org.Deviant.LeechCraft.IPendingImgSourceRequest/1.0")
192Q_DECLARE_INTERFACE (IImgSource, "org.Deviant.LeechCraft.IImgSource/1.0")
Interface for remote image storage plugins.
Definition iimgsource.h:147
virtual IPendingImgSourceRequest * RequestImages(const QByteArray &serviceId)=0
Requests the images for the given service.
virtual LC::ImageServiceInfos_t GetServices() const =0
Returns the list of supported services.
virtual ~IImgSource()
Definition iimgsource.h:149
virtual IPendingImgSourceRequest * StartDefaultChooser()=0
Requests the default image chooser to be opened.
Pending image request proxy object.
Definition iimgsource.h:94
virtual ~IPendingImgSourceRequest()
Definition iimgsource.h:96
virtual QObject * GetQObject()=0
Returns this object as QObject.
virtual LC::RemoteImageInfos_t GetInfos() const =0
Returns the information about the selected images.
virtual void error(const QString &text)=0
Emitted if there is an error obtaining information about the requested images.
virtual void ready()=0
Emitted when the information about the requested images becomes available.
Definition constants.h:15
QList< ImageServiceInfo > ImageServiceInfos_t
The list of image storage service descriptions.
Definition iimgsource.h:37
QList< RemoteImageInfo > RemoteImageInfos_t
A list of remote images.
Definition iimgsource.h:81
Describes a single image hosting service (including account).
Definition iimgsource.h:25
QString Name_
The human-readable name of the service.
Definition iimgsource.h:32
QByteArray ID_
The unique ID of the service (including account ID).
Definition iimgsource.h:28
Describes a remote image.
Definition iimgsource.h:42
QUrl Full_
The link to the full-sized image.
Definition iimgsource.h:45
QString Title_
The title of the image, if known.
Definition iimgsource.h:76
QUrl Preview_
The link to the preview version of the image, if applicable.
Definition iimgsource.h:54
QUrl Thumb_
The thumbnail-sized version of the image, if applicable.
Definition iimgsource.h:67
QSize FullSize_
The size of the full-sized image, if known.
Definition iimgsource.h:49
QSize PreviewSize_
The size of the preview version of the image, if applicable.
Definition iimgsource.h:59
QSize ThumbSize_
The size of the thumbnail-sized version of the image, if applicable.
Definition iimgsource.h:72