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
20
21#include <QQuickImageProvider>
22#include <private/qquickpixmap_p.h>
23#include <QScopedPointer>
24
26
28
29class SharedImageProvider;
30
32{
34 friend class SharedImageProvider;
35
36public:
43
44 QuickSharedImageLoader(QObject *parent = nullptr);
45protected:
46 QImage loadFile(const QString &path, ImageParameters *params) override;
47 QString key(const QString &path, ImageParameters *params) override;
48};
49
50class Q_LABSSHAREDIMAGE_EXPORT SharedImageProvider : public QQuickImageProviderWithOptions
51{
52public:
53 SharedImageProvider();
54
55 QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize, const QQuickImageProviderOptions &options) override;
56
57protected:
58 QScopedPointer<QuickSharedImageLoader> loader;
59};
60
61QT_END_NAMESPACE
62
63#endif // QSHAREDIMAGEPROVIDER_H
QuickSharedImageLoader(QObject *parent=nullptr)
QString key(const QString &path, ImageParameters *params) override
QImage loadFile(const QString &path, ImageParameters *params) override