Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | #ifndef QQUICKIMAGEPROVIDER_H | - |
41 | #define QQUICKIMAGEPROVIDER_H | - |
42 | | - |
43 | #include <QtQuick/qtquickglobal.h> | - |
44 | #include <QtGui/qimage.h> | - |
45 | #include <QtGui/qpixmap.h> | - |
46 | #include <QtQml/qqmlengine.h> | - |
47 | | - |
48 | QT_BEGIN_NAMESPACE | - |
49 | | - |
50 | | - |
51 | class QQuickImageProviderPrivate; | - |
52 | class QQuickAsyncImageProviderPrivate; | - |
53 | class QQuickImageProviderOptionsPrivate; | - |
54 | class QSGTexture; | - |
55 | class QQuickWindow; | - |
56 | | - |
57 | class Q_QUICK_EXPORT QQuickTextureFactory : public QObject | - |
58 | { | - |
59 | Q_OBJECT | - |
60 | public: | - |
61 | QQuickTextureFactory(); | - |
62 | ~QQuickTextureFactory() override; | - |
63 | | - |
64 | virtual QSGTexture *createTexture(QQuickWindow *window) const = 0; | - |
65 | virtual QSize textureSize() const = 0; | - |
66 | virtual int textureByteCount() const = 0; | - |
67 | virtual QImage image() const; | - |
68 | | - |
69 | static QQuickTextureFactory *textureFactoryForImage(const QImage &image); | - |
70 | }; | - |
71 | | - |
72 | class QQuickImageResponsePrivate; | - |
73 | | - |
74 | class Q_QUICK_EXPORT QQuickImageResponse : public QObject | - |
75 | { | - |
76 | Q_OBJECT | - |
77 | public: | - |
78 | QQuickImageResponse(); | - |
79 | ~QQuickImageResponse() override; | - |
80 | | - |
81 | virtual QQuickTextureFactory *textureFactory() const = 0; | - |
82 | virtual QString errorString() const; | - |
83 | | - |
84 | public Q_SLOTS: | - |
85 | virtual void cancel(); | - |
86 | | - |
87 | Q_SIGNALS: | - |
88 | void finished(); | - |
89 | | - |
90 | private: | - |
91 | Q_DECLARE_PRIVATE(QQuickImageResponse)executed 16 times by 1 test: return reinterpret_cast<QQuickImageResponsePrivate *>(qGetPtrHelper(d_ptr)); never executed: return reinterpret_cast<const QQuickImageResponsePrivate *>(qGetPtrHelper(d_ptr)); | 0-16 |
92 | Q_PRIVATE_SLOT(d_func(), void _q_finished()) | - |
93 | }; | - |
94 | | - |
95 | class Q_QUICK_EXPORT QQuickImageProvider : public QQmlImageProviderBase | - |
96 | { | - |
97 | friend class QQuickImageProviderWithOptions; | - |
98 | public: | - |
99 | QQuickImageProvider(ImageType type, Flags flags = Flags()); | - |
100 | ~QQuickImageProvider() override; | - |
101 | | - |
102 | ImageType imageType() const override; | - |
103 | Flags flags() const override; | - |
104 | | - |
105 | #if QT_VERSION >= QT_VERSION_CHECK(6,0,0) | - |
106 | virtual QImage requestImage(const QString &id, QSize *size, const QSize& requestedSize, const QQuickImageProviderOptions &options); | - |
107 | virtual QPixmap requestPixmap(const QString &id, QSize *size, const QSize& requestedSize, const QQuickImageProviderOptions &options); | - |
108 | virtual QQuickTextureFactory *requestTexture(const QString &id, QSize *size, const QSize &requestedSize, const QQuickImageProviderOptions &options); | - |
109 | #else | - |
110 | virtual QImage requestImage(const QString &id, QSize *size, const QSize& requestedSize); | - |
111 | virtual QPixmap requestPixmap(const QString &id, QSize *size, const QSize& requestedSize); | - |
112 | virtual QQuickTextureFactory *requestTexture(const QString &id, QSize *size, const QSize &requestedSize); | - |
113 | #endif | - |
114 | | - |
115 | private: | - |
116 | QQuickImageProviderPrivate *d; | - |
117 | }; | - |
118 | | - |
119 | class Q_QUICK_EXPORT QQuickAsyncImageProvider : public QQuickImageProvider | - |
120 | { | - |
121 | public: | - |
122 | QQuickAsyncImageProvider(); | - |
123 | ~QQuickAsyncImageProvider() override; | - |
124 | | - |
125 | #if QT_VERSION >= QT_VERSION_CHECK(6,0,0) | - |
126 | virtual QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize, const QQuickImageProviderOptions &options) = 0; | - |
127 | #else | - |
128 | virtual QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) = 0; | - |
129 | #endif | - |
130 | | - |
131 | private: | - |
132 | QQuickAsyncImageProviderPrivate *d; | - |
133 | }; | - |
134 | | - |
135 | QT_END_NAMESPACE | - |
136 | | - |
137 | #endif // QQUICKIMAGEPROVIDER_H | - |
| | |