1 | // Copyright (C) 2022 The Qt Company |
---|---|
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 QTMULTIMEDIAQUICKTYPES_H |
5 | #define QTMULTIMEDIAQUICKTYPES_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 <QtQml/qqml.h> |
19 | #include <QtMultimedia/QtMultimedia> |
20 | #include <private/qtmultimediaquickglobal_p.h> |
21 | |
22 | QT_BEGIN_NAMESPACE |
23 | |
24 | struct QMediaCaptureSessionForeign |
25 | { |
26 | Q_GADGET |
27 | QML_FOREIGN(QMediaCaptureSession) |
28 | QML_NAMED_ELEMENT(CaptureSession) // ### MediaCaptureSession? |
29 | }; |
30 | |
31 | struct QCameraForeign |
32 | { |
33 | Q_GADGET |
34 | QML_FOREIGN(QCamera) |
35 | QML_NAMED_ELEMENT(Camera) |
36 | }; |
37 | |
38 | struct QImageCaptureForeign |
39 | { |
40 | Q_GADGET |
41 | QML_ANONYMOUS |
42 | QML_FOREIGN(QImageCapture) |
43 | }; |
44 | |
45 | struct QScreenCaptureForeign |
46 | { |
47 | Q_GADGET |
48 | QML_ANONYMOUS |
49 | QML_FOREIGN(QScreenCapture) |
50 | }; |
51 | |
52 | struct QScreenForeign |
53 | { |
54 | Q_GADGET |
55 | QML_ANONYMOUS |
56 | QML_FOREIGN(QScreen) |
57 | }; |
58 | |
59 | struct QMediaRecorderForeign |
60 | { |
61 | Q_GADGET |
62 | QML_FOREIGN(QMediaRecorder) |
63 | QML_NAMED_ELEMENT(MediaRecorder) |
64 | }; |
65 | |
66 | struct QMediaMetaDataForeign |
67 | { |
68 | Q_GADGET |
69 | QML_FOREIGN(QMediaMetaData) |
70 | QML_NAMED_ELEMENT(mediaMetaData) |
71 | }; |
72 | |
73 | // To prevent the same type from being exported twice into qmltypes |
74 | // (for value type and for the enums) |
75 | struct QMediaMetaDataDerived : public QMediaMetaData |
76 | { |
77 | Q_GADGET |
78 | }; |
79 | |
80 | namespace QMediaMetaDataNamespaceForeign |
81 | { |
82 | Q_NAMESPACE |
83 | QML_FOREIGN_NAMESPACE(QMediaMetaDataDerived) |
84 | QML_NAMED_ELEMENT(MediaMetaData) |
85 | }; |
86 | |
87 | struct QMediaDevicesForeign |
88 | { |
89 | Q_GADGET |
90 | QML_FOREIGN(QMediaDevices) |
91 | QML_NAMED_ELEMENT(MediaDevices) |
92 | }; |
93 | |
94 | struct QAudioInputForeign |
95 | { |
96 | Q_GADGET |
97 | QML_FOREIGN(QAudioInput) |
98 | QML_NAMED_ELEMENT(AudioInput) |
99 | }; |
100 | |
101 | struct QAudioOutputForeign |
102 | { |
103 | Q_GADGET |
104 | QML_FOREIGN(QAudioOutput) |
105 | QML_NAMED_ELEMENT(AudioOutput) |
106 | }; |
107 | |
108 | struct QAudioDeviceForeign |
109 | { |
110 | Q_GADGET |
111 | QML_FOREIGN(QAudioDevice) |
112 | QML_NAMED_ELEMENT(audioDevice) |
113 | }; |
114 | |
115 | // To prevent the same type from being exported twice into qmltypes |
116 | // (for value type and for the enums) |
117 | struct QAudioDeviceDerived : public QAudioDevice |
118 | { |
119 | Q_GADGET |
120 | }; |
121 | |
122 | namespace QAudioDeviceNamespaceForeign |
123 | { |
124 | Q_NAMESPACE |
125 | QML_FOREIGN_NAMESPACE(QAudioDeviceDerived) |
126 | QML_NAMED_ELEMENT(AudioDevice) |
127 | }; |
128 | |
129 | struct QCameraDeviceForeign |
130 | { |
131 | Q_GADGET |
132 | QML_FOREIGN(QCameraDevice) |
133 | QML_NAMED_ELEMENT(cameraDevice) |
134 | }; |
135 | |
136 | // To prevent the same type from being exported twice into qmltypes |
137 | // (for value type and for the enums) |
138 | struct QCameraDeviceDerived : public QCameraDevice |
139 | { |
140 | Q_GADGET |
141 | }; |
142 | |
143 | namespace QCameraDeviceNamespaceForeign |
144 | { |
145 | Q_NAMESPACE |
146 | QML_FOREIGN_NAMESPACE(QCameraDeviceDerived) |
147 | QML_NAMED_ELEMENT(CameraDevice) |
148 | }; |
149 | |
150 | struct QMediaFormatForeign |
151 | { |
152 | Q_GADGET |
153 | QML_FOREIGN(QMediaFormat) |
154 | QML_NAMED_ELEMENT(mediaFormat) |
155 | }; |
156 | |
157 | // To prevent the same type from being exported twice into qmltypes |
158 | // (for value type and for the enums) |
159 | struct QMediaFormatDerived : public QMediaFormat |
160 | { |
161 | Q_GADGET |
162 | }; |
163 | |
164 | namespace QMediaFormatNamespaceForeign |
165 | { |
166 | Q_NAMESPACE |
167 | QML_FOREIGN_NAMESPACE(QMediaFormatDerived) |
168 | QML_NAMED_ELEMENT(MediaFormat) |
169 | }; |
170 | |
171 | struct QCameraFormatForeign |
172 | { |
173 | Q_GADGET |
174 | QML_FOREIGN(QCameraFormat) |
175 | QML_NAMED_ELEMENT(cameraFormat) |
176 | }; |
177 | |
178 | struct QCapturableWindowForeign |
179 | { |
180 | Q_GADGET |
181 | QML_FOREIGN(QCapturableWindow) |
182 | QML_NAMED_ELEMENT(capturableWindow) |
183 | }; |
184 | |
185 | struct QWindowCaptureForeign |
186 | { |
187 | Q_GADGET |
188 | QML_FOREIGN(QWindowCapture) |
189 | QML_NAMED_ELEMENT(WindowCapture) |
190 | }; |
191 | |
192 | QT_END_NAMESPACE |
193 | |
194 | #endif |
195 |
Definitions
- QMediaCaptureSessionForeign
- QCameraForeign
- QImageCaptureForeign
- QScreenCaptureForeign
- QScreenForeign
- QMediaRecorderForeign
- QMediaMetaDataForeign
- QMediaMetaDataDerived
- QMediaDevicesForeign
- QAudioInputForeign
- QAudioOutputForeign
- QAudioDeviceForeign
- QAudioDeviceDerived
- QCameraDeviceForeign
- QCameraDeviceDerived
- QMediaFormatForeign
- QMediaFormatDerived
- QCameraFormatForeign
- QCapturableWindowForeign
Learn Advanced QML with KDAB
Find out more