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);
50
51 void setStatus(QQuickImageBase::Status value);
52 void setProgress(qreal value);
53
54 QUrl url;
55 QQuickPixmap *pendingPix = nullptr;
56 QQuickPixmap *currentPix = nullptr;
57 QQuickPixmap pix1;
58 QQuickPixmap pix2;
59 QSize sourcesize;
60 QSize oldSourceSize;
61 QRectF sourceClipRect;
62 QQuickImageProviderOptions providerOptions;
63 QColorSpace colorSpace;
64
65 int currentFrame = 0;
66 int frameCount = 0;
67 qreal progress = 0;
68 qreal devicePixelRatio = 1;
69 QQuickImageBase::Status status = QQuickImageBase::Null;
70
71 bool async : 1;
72 bool cache : 1;
73 bool mirrorHorizontally: 1;
74 bool mirrorVertically : 1;
75 bool oldAutoTransform : 1;
76 bool retainWhileLoading : 1;
77};
78
79QT_END_NAMESPACE
80
81#endif // QQUICKIMAGEBASE_P_P_H
QMap< int, QQuickPixmap * > frameMap
QT_REQUIRE_CONFIG(animation)
QT_REQUIRE_CONFIG(quick_animatedimage)