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 | |
4 | #ifndef QQUICKIMAGEBASE_P_P_H |
5 | #define QQUICKIMAGEBASE_P_P_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include "qquickimplicitsizeitem_p_p.h" |
19 | #include "qquickimagebase_p.h" |
20 | |
21 | #include <QtQuick/private/qquickpixmap_p.h> |
22 | |
23 | QT_BEGIN_NAMESPACE |
24 | |
25 | class QNetworkReply; |
26 | class Q_QUICK_EXPORT QQuickImageBasePrivate : public QQuickImplicitSizeItemPrivate |
27 | { |
28 | Q_DECLARE_PUBLIC(QQuickImageBase) |
29 | |
30 | public: |
31 | QQuickImageBasePrivate() |
32 | : async(false), |
33 | cache(true), |
34 | mirrorHorizontally(false), |
35 | mirrorVertically(false), |
36 | oldAutoTransform(false), |
37 | retainWhileLoading(false) |
38 | { |
39 | pendingPix = &pix1; |
40 | currentPix = &pix1; |
41 | } |
42 | |
43 | virtual bool updateDevicePixelRatio(qreal targetDevicePixelRatio); |
44 | |
45 | void setStatus(QQuickImageBase::Status value); |
46 | void setProgress(qreal value); |
47 | |
48 | QUrl url; |
49 | QQuickPixmap *pendingPix = nullptr; |
50 | QQuickPixmap *currentPix = nullptr; |
51 | QQuickPixmap pix1; |
52 | QQuickPixmap pix2; |
53 | QSize sourcesize; |
54 | QSize oldSourceSize; |
55 | QRectF sourceClipRect; |
56 | QQuickImageProviderOptions providerOptions; |
57 | QColorSpace colorSpace; |
58 | |
59 | int currentFrame = 0; |
60 | int frameCount = 0; |
61 | qreal progress = 0; |
62 | qreal devicePixelRatio = 1; |
63 | QQuickImageBase::Status status = QQuickImageBase::Null; |
64 | |
65 | bool async : 1; |
66 | bool cache : 1; |
67 | bool mirrorHorizontally: 1; |
68 | bool mirrorVertically : 1; |
69 | bool oldAutoTransform : 1; |
70 | bool retainWhileLoading : 1; |
71 | }; |
72 | |
73 | QT_END_NAMESPACE |
74 | |
75 | #endif // QQUICKIMAGEBASE_P_P_H |
76 |