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
qquickimagebase_p_p.h
Go to the documentation of this file.
1// Copyright (C) 2019 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 QQUICKIMAGEBASE_P_P_H
6#define QQUICKIMAGEBASE_P_P_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
21
22#include <QtQuick/private/qquickpixmap_p.h>
23
25
26class QNetworkReply;
27class Q_QUICK_EXPORT QQuickImageBasePrivate : public QQuickImplicitSizeItemPrivate
28{
29 Q_DECLARE_PUBLIC(QQuickImageBase)
30
31public:
32 QQuickImageBasePrivate()
33 : async(false),
34 cache(true),
35 mirrorHorizontally(false),
36 mirrorVertically(false),
37 oldAutoTransform(false),
38 retainWhileLoading(false)
39 {
40 pendingPix = &pix1;
41 currentPix = &pix1;
42 }
43
44 static QQuickImageBasePrivate *get(QQuickImageBase *image)
45 {
46 return image->d_func();
47 }
48
49 virtual bool updateDevicePixelRatio(qreal targetDevicePixelRatio, bool scalable);
50 qreal devicePixelRatioForLoading();
51 bool needsReloadForDevicePixelRatio() const;
52
53 void setStatus(QQuickImageBase::Status value);
54 void setProgress(qreal value);
55
56 QUrl url;
57 QQuickPixmap *pendingPix = nullptr;
58 QQuickPixmap *currentPix = nullptr;
59 QQuickPixmap pix1;
60 QQuickPixmap pix2;
61 QSize sourcesize;
62 QSize oldSourceSize;
63 QRectF sourceClipRect;
64 QQuickImageProviderOptions providerOptions;
65 QColorSpace colorSpace;
66
67 int currentFrame = 0;
68 int frameCount = 0;
69 qreal progress = 0;
70 qreal devicePixelRatio = 1;
71 // The device pixel ratio the image was last loaded for, or 0 if its loading doesn't
72 // depend on it. Unlike devicePixelRatio, which is the device pixel ratio of the loaded image.
73 qreal loadedForDevicePixelRatio = 0;
74 QQuickImageBase::Status status = QQuickImageBase::Null;
75
76 bool async : 1;
77 bool cache : 1;
78 bool mirrorHorizontally: 1;
79 bool mirrorVertically : 1;
80 bool oldAutoTransform : 1;
81 bool retainWhileLoading : 1;
82};
83
84QT_END_NAMESPACE
85
86#endif // QQUICKIMAGEBASE_P_P_H
QMap< int, QQuickPixmap * > frameMap
Combined button and popup list for selecting options.
QT_REQUIRE_CONFIG(animation)
QT_REQUIRE_CONFIG(quick_animatedimage)