Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickpixmapcache_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count |
---|---|---|
1 | - | |
2 | - | |
3 | - | |
4 | - | |
5 | class QQmlEngine; | - |
6 | class QQuickPixmapData; | - |
7 | class QQuickTextureFactory; | - |
8 | class QQuickImageProviderOptionsPrivate; | - |
9 | - | |
10 | class QQuickDefaultTextureFactory : public QQuickTextureFactory | - |
11 | { | - |
12 | public: | - |
13 | #pragma GCC diagnostic push | - |
14 | - | |
15 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - |
16 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - |
17 | #pragma GCC diagnostic ignored "-Wattributes" | - |
18 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - |
19 | #pragma GCC diagnostic pop | - |
20 | struct QPrivateSignal {}; | - |
21 | public: | - |
22 | QQuickDefaultTextureFactory(const QImage &i); | - |
23 | QSGTexture *createTexture(QQuickWindow *window) const override; | - |
24 | QSize textureSize() const override { return executed 59263 times by 12 tests: size;return size; Executed by:
executed 59263 times by 12 tests: }return size; Executed by:
| 59263 |
25 | int textureByteCount() const override { return executed 26876 times by 36 tests: size.width() * size.height() * 4;return size.width() * size.height() * 4; Executed by:
executed 26876 times by 36 tests: }return size.width() * size.height() * 4; Executed by:
| 26876 |
26 | QImage image() const override { return executed 333 times by 27 tests: im;return im; Executed by:
executed 333 times by 27 tests: }return im; Executed by:
| 333 |
27 | - | |
28 | private: | - |
29 | QImage im; | - |
30 | QSize size; | - |
31 | }; | - |
32 | - | |
33 | class QQuickImageProviderPrivate | - |
34 | { | - |
35 | public: | - |
36 | QQuickImageProvider::ImageType type; | - |
37 | QQuickImageProvider::Flags flags; | - |
38 | bool isProviderWithOptions; | - |
39 | }; | - |
40 | - | |
41 | - | |
42 | class __attribute__((visibility("default"))) QQuickImageProviderOptions | - |
43 | { | - |
44 | public: | - |
45 | enum AutoTransform { | - |
46 | UsePluginDefaultTransform = -1, | - |
47 | ApplyTransform = 0, | - |
48 | DoNotApplyTransform = 1 | - |
49 | }; | - |
50 | - | |
51 | QQuickImageProviderOptions(); | - |
52 | ~QQuickImageProviderOptions(); | - |
53 | - | |
54 | QQuickImageProviderOptions(const QQuickImageProviderOptions&); | - |
55 | QQuickImageProviderOptions& operator=(const QQuickImageProviderOptions&); | - |
56 | - | |
57 | bool operator==(const QQuickImageProviderOptions&) const; | - |
58 | - | |
59 | AutoTransform autoTransform() const; | - |
60 | void setAutoTransform(AutoTransform autoTransform); | - |
61 | - | |
62 | bool preserveAspectRatioCrop() const; | - |
63 | void setPreserveAspectRatioCrop(bool preserveAspectRatioCrop); | - |
64 | - | |
65 | bool preserveAspectRatioFit() const; | - |
66 | void setPreserveAspectRatioFit(bool preserveAspectRatioFit); | - |
67 | - | |
68 | private: | - |
69 | QSharedDataPointer<QQuickImageProviderOptionsPrivate> d; | - |
70 | }; | - |
71 | - | |
72 | class __attribute__((visibility("default"))) QQuickPixmap | - |
73 | { | - |
74 | public: static inline QString tr(const char *sourceText, const char *disambiguation = nullptr, int n = -1) { return QCoreApplication::translate("QQuickPixmap", sourceText, disambiguation, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *sourceText, const char *disambiguation = nullptr, int n = -1) { return QCoreApplication::translate("QQuickPixmap", sourceText, disambiguation, n); } private: | - |
75 | public: | - |
76 | QQuickPixmap(); | - |
77 | QQuickPixmap(QQmlEngine *, const QUrl &); | - |
78 | QQuickPixmap(QQmlEngine *, const QUrl &, const QSize &); | - |
79 | QQuickPixmap(const QUrl &, const QImage &image); | - |
80 | ~QQuickPixmap(); | - |
81 | - | |
82 | enum Status { Null, Ready, Error, Loading }; | - |
83 | - | |
84 | enum Option { | - |
85 | Asynchronous = 0x00000001, | - |
86 | Cache = 0x00000002 | - |
87 | }; | - |
88 | typedef QFlags<Option> Options; | - |
89 | - | |
90 | bool isNull() const; | - |
91 | bool isReady() const; | - |
92 | bool isError() const; | - |
93 | bool isLoading() const; | - |
94 | - | |
95 | Status status() const; | - |
96 | QString error() const; | - |
97 | const QUrl &url() const; | - |
98 | const QSize &implicitSize() const; | - |
99 | const QSize &requestSize() const; | - |
100 | QQuickImageProviderOptions::AutoTransform autoTransform() const; | - |
101 | QImage image() const; | - |
102 | void setImage(const QImage &); | - |
103 | void setPixmap(const QQuickPixmap &other); | - |
104 | - | |
105 | QQuickTextureFactory *textureFactory() const; | - |
106 | - | |
107 | QRect rect() const; | - |
108 | int width() const; | - |
109 | int height() const; | - |
110 | - | |
111 | void load(QQmlEngine *, const QUrl &); | - |
112 | void load(QQmlEngine *, const QUrl &, QQuickPixmap::Options options); | - |
113 | void load(QQmlEngine *, const QUrl &, const QSize &); | - |
114 | void load(QQmlEngine *, const QUrl &, const QSize &, QQuickPixmap::Options options); | - |
115 | void load(QQmlEngine *, const QUrl &, const QSize &, QQuickPixmap::Options options, const QQuickImageProviderOptions &providerOptions); | - |
116 | - | |
117 | void clear(); | - |
118 | void clear(QObject *); | - |
119 | - | |
120 | bool connectFinished(QObject *, const char *); | - |
121 | bool connectFinished(QObject *, int); | - |
122 | bool connectDownloadProgress(QObject *, const char *); | - |
123 | bool connectDownloadProgress(QObject *, int); | - |
124 | - | |
125 | static void purgeCache(); | - |
126 | static bool isCached(const QUrl &url, const QSize &requestSize, const QQuickImageProviderOptions &options); | - |
127 | - | |
128 | static const QLatin1String itemGrabberScheme; | - |
129 | - | |
130 | private: | - |
131 | QQuickPixmap(const QQuickPixmap &) = delete; QQuickPixmap &operator=(const QQuickPixmap &) = delete; | - |
132 | QQuickPixmapData *d; | - |
133 | QIntrusiveListNode dataListNode; | - |
134 | friend class QQuickPixmapData; | - |
135 | }; | - |
136 | - | |
137 | constexpr inline QFlags<QQuickPixmap::Options::enum_type> operator|(QQuickPixmap::Options::enum_type f1, QQuickPixmap::Options::enum_type f2) noexcept { return QFlags<QQuickPixmap::Options::enum_type>(f1) | f2; } constexpr inline QFlags<QQuickPixmap::Options::enum_type> operator|(QQuickPixmap::Options::enum_type f1, QFlags<QQuickPixmap::Options::enum_type> f2) noexcept { return f2 | f1; } constexpr inline QIncompatibleFlag operator|(QQuickPixmap::Options::enum_type f1, int f2) noexcept { return QIncompatibleFlag(int(f1) | f2); } | - |
138 | - | |
139 | - | |
140 | - | |
141 | class __attribute__((visibility("default"))) QQuickImageProviderWithOptions : public QQuickAsyncImageProvider | - |
142 | { | - |
143 | public: | - |
144 | QQuickImageProviderWithOptions(ImageType type, Flags flags = Flags()); | - |
145 | - | |
146 | QImage requestImage(const QString &id, QSize *size, const QSize& requestedSize) override; | - |
147 | QPixmap requestPixmap(const QString &id, QSize *size, const QSize& requestedSize) override; | - |
148 | QQuickTextureFactory *requestTexture(const QString &id, QSize *size, const QSize &requestedSize) override; | - |
149 | QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) override; | - |
150 | - | |
151 | virtual QImage requestImage(const QString &id, QSize *size, const QSize& requestedSize, const QQuickImageProviderOptions &options); | - |
152 | virtual QPixmap requestPixmap(const QString &id, QSize *size, const QSize& requestedSize, const QQuickImageProviderOptions &options); | - |
153 | virtual QQuickTextureFactory *requestTexture(const QString &id, QSize *size, const QSize &requestedSize, const QQuickImageProviderOptions &options); | - |
154 | virtual QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize, const QQuickImageProviderOptions &options); | - |
155 | - | |
156 | static QSize loadSize(const QSize &originalSize, const QSize &requestedSize, const QByteArray &format, const QQuickImageProviderOptions &options); | - |
157 | static QQuickImageProviderWithOptions *checkedCast(QQuickImageProvider *provider); | - |
158 | }; | - |
159 | - | |
160 | - | |
Switch to Source code | Preprocessed file |