Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsharedimageprovider_p.h
Go to the documentation of this file.
1
// Copyright (C) 2017 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
QSHAREDIMAGEPROVIDER_H
6
#
define
QSHAREDIMAGEPROVIDER_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
"qtlabssharedimageglobal_p.h"
20
21
#
include
<
QQuickImageProvider
>
22
#
include
<
private
/
qquickpixmap_p
.
h
>
23
#
include
<
QScopedPointer
>
24
25
#
include
"qsharedimageloader_p.h"
26
27
QT_BEGIN_NAMESPACE
28
29
class
SharedImageProvider;
30
31
class
QuickSharedImageLoader
:
public
QSharedImageLoader
32
{
33
Q_OBJECT
34
friend
class
SharedImageProvider
;
35
36
public
:
37
enum
ImageParameter
{
38
OriginalSize
= 0,
39
RequestedSize
,
40
ProviderOptions
,
41
NumImageParameters
42
};
43
44
QuickSharedImageLoader
(QObject *parent =
nullptr
);
45
protected
:
46
QImage
loadFile
(
const
QString &path, ImageParameters *params)
override
;
47
QString
key
(
const
QString &path, ImageParameters *params)
override
;
48
};
49
50
class
Q_LABSSHAREDIMAGE_EXPORT
SharedImageProvider
:
public
QQuickImageProviderWithOptions
51
{
52
public
:
53
SharedImageProvider();
54
55
QImage requestImage(
const
QString &id, QSize *size,
const
QSize &requestedSize,
const
QQuickImageProviderOptions &options) override;
56
57
protected
:
58
QScopedPointer<QuickSharedImageLoader> loader;
59
};
60
61
QT_END_NAMESPACE
62
63
#
endif
// QSHAREDIMAGEPROVIDER_H
QuickSharedImageLoader
Definition
qsharedimageprovider_p.h:32
QuickSharedImageLoader::ImageParameter
ImageParameter
Definition
qsharedimageprovider_p.h:37
QuickSharedImageLoader::NumImageParameters
@ NumImageParameters
Definition
qsharedimageprovider_p.h:41
QuickSharedImageLoader::OriginalSize
@ OriginalSize
Definition
qsharedimageprovider_p.h:38
QuickSharedImageLoader::RequestedSize
@ RequestedSize
Definition
qsharedimageprovider_p.h:39
QuickSharedImageLoader::ProviderOptions
@ ProviderOptions
Definition
qsharedimageprovider_p.h:40
QuickSharedImageLoader::QuickSharedImageLoader
QuickSharedImageLoader(QObject *parent=nullptr)
Definition
qsharedimageprovider.cpp:16
QuickSharedImageLoader::key
QString key(const QString &path, ImageParameters *params) override
Definition
qsharedimageprovider.cpp:55
QuickSharedImageLoader::loadFile
QImage loadFile(const QString &path, ImageParameters *params) override
Definition
qsharedimageprovider.cpp:18
SharedImageProvider
Definition
qsharedimageprovider_p.h:51
QPlatformGraphicsBufferHelper
\inmodule QtGui
qtdeclarative
src
labs
sharedimage
qsharedimageprovider_p.h
Generated on
for Qt by
1.14.0