Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qquickimageprovider.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QQUICKIMAGEPROVIDER_H
6
#
define
QQUICKIMAGEPROVIDER_H
7
8
#
include
<
QtQuick
/
qtquickglobal
.
h
>
9
#
include
<
QtGui
/
qimage
.
h
>
10
#
include
<
QtGui
/
qpixmap
.
h
>
11
#
include
<
QtQml
/
qqmlengine
.
h
>
12
13
QT_BEGIN_NAMESPACE
14
15
16
class
QQuickImageProviderPrivate;
17
class
QQuickAsyncImageProviderPrivate;
18
class
QQuickImageProviderOptionsPrivate
;
19
class
QSGTexture;
20
class
QQuickWindow;
21
22
class
Q_QUICK_EXPORT
QQuickTextureFactory
:
public
QObject
23
{
24
Q_OBJECT
25
public
:
26
QQuickTextureFactory();
27
~QQuickTextureFactory() override;
28
29
virtual
QSGTexture *createTexture(QQuickWindow *window)
const
= 0;
30
virtual
QSize textureSize()
const
= 0;
31
virtual
int
textureByteCount()
const
= 0;
32
virtual
QImage image()
const
;
33
34
static
QQuickTextureFactory *textureFactoryForImage(
const
QImage &image);
35
};
36
37
class
QQuickImageResponsePrivate
;
38
39
class
Q_QUICK_EXPORT
QQuickImageResponse
:
public
QObject
40
{
41
Q_OBJECT
42
public
:
43
QQuickImageResponse();
44
~QQuickImageResponse() override;
45
46
virtual
QQuickTextureFactory *textureFactory()
const
= 0;
47
virtual
QString errorString()
const
;
48
49
public
Q_SLOTS:
50
virtual
void
cancel();
51
52
Q_SIGNALS:
53
void
finished();
54
55
private
:
56
Q_DECLARE_PRIVATE(QQuickImageResponse)
57
Q_PRIVATE_SLOT(d_func(),
void
_q_finished())
58
};
59
60
class
QQuickImageProviderOptions;
61
62
class
Q_QUICK_EXPORT
QQuickImageProvider
:
public
QQmlImageProviderBase
63
{
64
friend
class
QQuickImageProviderWithOptions;
65
Q_OBJECT
66
public
:
67
QQuickImageProvider(ImageType type, Flags flags = Flags());
68
~QQuickImageProvider() override;
69
70
ImageType imageType()
const
override;
71
Flags flags()
const
override;
72
73
virtual
QImage requestImage(
const
QString &id, QSize *size,
const
QSize& requestedSize);
74
virtual
QPixmap requestPixmap(
const
QString &id, QSize *size,
const
QSize& requestedSize);
75
virtual
QQuickTextureFactory *requestTexture(
const
QString &id, QSize *size,
const
QSize &requestedSize);
76
77
private
:
78
QQuickImageProviderPrivate *d;
79
};
80
81
class
Q_QUICK_EXPORT
QQuickAsyncImageProvider
:
public
QQuickImageProvider
82
{
83
public
:
84
QQuickAsyncImageProvider();
85
~QQuickAsyncImageProvider() override;
86
87
virtual
QQuickImageResponse *requestImageResponse(
const
QString &id,
const
QSize &requestedSize) = 0;
88
89
private
:
90
QQuickAsyncImageProviderPrivate *d;
91
};
92
93
QT_END_NAMESPACE
94
95
#
endif
// QQUICKIMAGEPROVIDER_H
QQuickAsyncImageProvider
The QQuickAsyncImageProvider class provides an interface for asynchronous control of QML image reques...
Definition
qquickimageprovider.h:82
QQuickImageProviderOptionsPrivate
Definition
qquickimageprovider.cpp:475
QQuickImageProviderOptionsPrivate::QQuickImageProviderOptionsPrivate
QQuickImageProviderOptionsPrivate()
Definition
qquickimageprovider.cpp:477
QQuickImageProviderOptionsPrivate::preserveAspectRatioFit
bool preserveAspectRatioFit
Definition
qquickimageprovider.cpp:485
QQuickImageProviderOptionsPrivate::preserveAspectRatioCrop
bool preserveAspectRatioCrop
Definition
qquickimageprovider.cpp:484
QQuickImageProviderOptionsPrivate::targetColorSpace
QColorSpace targetColorSpace
Definition
qquickimageprovider.cpp:481
QQuickImageProviderOptionsPrivate::sourceClipRect
QRectF sourceClipRect
Definition
qquickimageprovider.cpp:482
QQuickImageProviderOptionsPrivate::autoTransform
QQuickImageProviderOptions::AutoTransform autoTransform
Definition
qquickimageprovider.cpp:483
QQuickImageProvider
The QQuickImageProvider class provides an interface for supporting pixmaps and threaded image request...
Definition
qquickimageprovider.h:63
QQuickImageResponsePrivate
Definition
qquickimageprovider_p.h:26
QQuickImageResponse
The QQuickImageResponse class provides an interface for asynchronous image loading in QQuickAsyncImag...
Definition
qquickimageprovider.h:40
QQuickTextureFactory
The QQuickTextureFactory class provides an interface for loading custom textures from QML....
Definition
qquickimageprovider.h:23
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtdeclarative
src
quick
util
qquickimageprovider.h
Generated on
for Qt by
1.18.0