1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 ** |
|
7 ** This file is part of the Qt Mobility Components. |
|
8 ** |
|
9 ** $QT_BEGIN_LICENSE:LGPL$ |
|
10 ** No Commercial Usage |
|
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
|
16 ** GNU Lesser General Public License Usage |
|
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 ** General Public License version 2.1 as published by the Free Software |
|
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 ** packaging of this file. Please review the following information to |
|
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 ** |
|
24 ** In addition, as a special exception, Nokia gives you certain additional |
|
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 ** |
|
28 ** If you have questions regarding the use of this file, please contact |
|
29 ** Nokia at qt-info@nokia.com. |
|
30 ** |
|
31 ** |
|
32 ** |
|
33 ** |
|
34 ** |
|
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
|
39 ** |
|
40 ****************************************************************************/ |
|
41 |
|
42 #include <experimental/qcameraexposurecontrol.h> |
|
43 #include "qmediacontrol_p.h" |
|
44 |
|
45 QTM_BEGIN_NAMESPACE |
|
46 |
|
47 /*! |
|
48 \class QCameraExposureControl |
|
49 |
|
50 \preliminary |
|
51 \brief The QCameraExposureControl class supplies control for exposure |
|
52 related camera parameters. |
|
53 |
|
54 \ingroup camera |
|
55 |
|
56 The interface name of QCameraExposureControl is \c com.nokia.Qt.QCameraExposureControl/1.0 as |
|
57 defined in QCameraExposureControl_iid. |
|
58 |
|
59 The Camera API of Qt Mobility is still in \bold Technology Preview. It has not undergone |
|
60 the same level of review and testing as the rest of the APIs. |
|
61 |
|
62 The API exposed by the classes in this component are not stable, and will |
|
63 undergo modification or removal prior to the final release of Qt Mobility. |
|
64 |
|
65 \sa QMediaService::control(), QCamera |
|
66 */ |
|
67 |
|
68 /*! |
|
69 \macro QCameraExposureControl_iid |
|
70 |
|
71 \c com.nokia.Qt.QCameraExposureControl/1.0 |
|
72 |
|
73 Defines the interface name of the QCameraExposureControl class. |
|
74 |
|
75 \relates QCameraExposureControl |
|
76 */ |
|
77 |
|
78 /*! |
|
79 Constructs a camera exposure control object with \a parent. |
|
80 */ |
|
81 |
|
82 QCameraExposureControl::QCameraExposureControl(QObject *parent): |
|
83 QMediaControl(*new QMediaControlPrivate, parent) |
|
84 { |
|
85 } |
|
86 |
|
87 /*! |
|
88 Destruct the camera control object. |
|
89 */ |
|
90 |
|
91 QCameraExposureControl::~QCameraExposureControl() |
|
92 { |
|
93 } |
|
94 |
|
95 /*! |
|
96 \fn void QCameraExposureControl::lockExposure() |
|
97 |
|
98 Lock the exposure. |
|
99 */ |
|
100 |
|
101 |
|
102 /*! |
|
103 \fn void QCameraExposureControl::unlockExposure() |
|
104 |
|
105 Unlock the exposure. |
|
106 */ |
|
107 |
|
108 |
|
109 /*! |
|
110 \fn QCamera::FlashMode QCameraExposureControl::flashMode() const |
|
111 |
|
112 Returns the current flash mode. |
|
113 */ |
|
114 |
|
115 |
|
116 /*! |
|
117 \fn void QCameraExposureControl::setFlashMode(QCamera::FlashMode mode) |
|
118 |
|
119 Set the current flash \a mode. |
|
120 */ |
|
121 |
|
122 |
|
123 /*! |
|
124 \fn QCamera::FlashModes QCameraExposureControl::supportedFlashModes() const |
|
125 |
|
126 Returns the flash modes available. |
|
127 */ |
|
128 |
|
129 |
|
130 /*! |
|
131 \fn bool QCameraExposureControl::isFlashReady() const |
|
132 |
|
133 Returns true if flash is charged. |
|
134 */ |
|
135 |
|
136 |
|
137 |
|
138 /*! |
|
139 \fn QCamera::ExposureMode QCameraExposureControl::exposureMode() const |
|
140 |
|
141 Returns the exposure mode. |
|
142 */ |
|
143 |
|
144 |
|
145 /*! |
|
146 \fn void QCameraExposureControl::setExposureMode(QCamera::ExposureMode mode) |
|
147 |
|
148 Set the exposure mode to \a mode. |
|
149 */ |
|
150 |
|
151 |
|
152 /*! |
|
153 \fn QCamera::ExposureModes QCameraExposureControl::supportedExposureModes() const |
|
154 |
|
155 Returns the available exposure modes. |
|
156 */ |
|
157 |
|
158 |
|
159 /*! |
|
160 \fn qreal QCameraExposureControl::exposureCompensation() const |
|
161 |
|
162 Returns the exposure compensation in EV. |
|
163 */ |
|
164 |
|
165 |
|
166 /*! |
|
167 \fn void QCameraExposureControl::setExposureCompensation(qreal ev) |
|
168 |
|
169 Set the exposure compensation to \a ev |
|
170 */ |
|
171 |
|
172 |
|
173 |
|
174 /*! |
|
175 \fn QCamera::MeteringMode QCameraExposureControl::meteringMode() const |
|
176 Returns the current metering mode. |
|
177 */ |
|
178 |
|
179 |
|
180 /*! |
|
181 \fn void QCameraExposureControl::setMeteringMode(QCamera::MeteringMode mode) |
|
182 |
|
183 Set the metering mode to \a mode. |
|
184 */ |
|
185 |
|
186 |
|
187 /*! |
|
188 \fn QCamera::MeteringModes QCameraExposureControl::supportedMeteringModes() const |
|
189 Return the metering modes available. |
|
190 */ |
|
191 |
|
192 /*! |
|
193 \fn int QCameraExposureControl::isoSensitivity() const |
|
194 |
|
195 Returns the ISO sensitivity, or -1 if unknown. |
|
196 */ |
|
197 |
|
198 /*! |
|
199 \fn QList<int> QCameraExposureControl::supportedIsoSensitivities(bool *continuous) const |
|
200 |
|
201 Returns the list of ISO senitivities camera supports. |
|
202 |
|
203 If the camera supports arbitrary ISO sensitivities within the supported range, |
|
204 *\a continuous is set to true, otherwise *\a continuous is set to false. |
|
205 */ |
|
206 |
|
207 |
|
208 /*! |
|
209 \fn void QCameraExposureControl::setManualIsoSensitivity(int iso) |
|
210 |
|
211 Set the sensitivity to \a iso |
|
212 */ |
|
213 |
|
214 |
|
215 /*! |
|
216 \fn void QCameraExposureControl::setAutoIsoSensitivity() |
|
217 |
|
218 Turn on auto sensitivity |
|
219 */ |
|
220 |
|
221 |
|
222 /*! |
|
223 \fn qreal QCameraExposureControl::aperture() const |
|
224 |
|
225 Returns the aperture |
|
226 */ |
|
227 |
|
228 |
|
229 /*! |
|
230 \fn QList<qreal> QCameraExposureControl::supportedApertures(bool *continuous) const |
|
231 |
|
232 Returns the list of aperture values camera supports. |
|
233 The apertures list can change depending on the focal length, |
|
234 in such a case the apertureRangeChanged() signal is emited. |
|
235 |
|
236 If the camera supports arbitrary aperture values within the supported range, |
|
237 *\a continuous is set to true, otherwise *\a continuous is set to false. |
|
238 */ |
|
239 |
|
240 |
|
241 /*! |
|
242 \fn void QCameraExposureControl::setManualAperture(qreal aperture) |
|
243 |
|
244 Set the aperture to \a aperture |
|
245 */ |
|
246 |
|
247 |
|
248 /*! |
|
249 \fn void QCameraExposureControl::setAutoAperture() |
|
250 |
|
251 Turn on auto aperture |
|
252 */ |
|
253 |
|
254 |
|
255 |
|
256 /*! |
|
257 \fn qreal QCameraExposureControl::shutterSpeed() const |
|
258 |
|
259 Returns the shutter speed |
|
260 */ |
|
261 |
|
262 /*! |
|
263 \fn QList<qreal> QCameraExposureControl::supportedShutterSpeeds(bool *continuous) const |
|
264 |
|
265 Returns the list of shutter speed values in seconds camera supports. |
|
266 |
|
267 If the camera supports arbitrary shutter speed values within the supported range, |
|
268 *\a continuous is set to true, otherwise *\a continuous is set to false. |
|
269 */ |
|
270 |
|
271 |
|
272 /*! |
|
273 \fn void QCameraExposureControl::setManualShutterSpeed(qreal seconds) |
|
274 |
|
275 Set the shutter speed to \a seconds |
|
276 */ |
|
277 |
|
278 |
|
279 /*! |
|
280 \fn void QCameraExposureControl::setAutoShutterSpeed() |
|
281 |
|
282 Turn on auto shutter speed |
|
283 */ |
|
284 |
|
285 |
|
286 |
|
287 /*! |
|
288 \fn bool QCameraExposureControl::isExposureLocked() const |
|
289 |
|
290 Returns true if exposure locked |
|
291 */ |
|
292 |
|
293 /*! |
|
294 \fn void QCameraExposureControl::exposureLocked() |
|
295 |
|
296 Signal emitted when exposure locked. |
|
297 */ |
|
298 |
|
299 /*! |
|
300 \fn void QCameraExposureControl::flashReady(bool ready) |
|
301 |
|
302 Signal emitted when flash state changes, flash is charged \a ready. |
|
303 */ |
|
304 |
|
305 /*! |
|
306 \fn void QCameraExposureControl::apertureChanged(qreal value) |
|
307 |
|
308 Signal emitted when the aperture value has changed to \a value. |
|
309 */ |
|
310 |
|
311 /*! |
|
312 \fn void QCameraExposureControl::apertureRangeChanged() |
|
313 |
|
314 Signal emitted when the aperture range has changed. |
|
315 */ |
|
316 |
|
317 /*! |
|
318 \fn void QCameraExposureControl::shutterSpeedChanged(qreal value) |
|
319 |
|
320 Signal emitted when the shutter speed changes to \a value. |
|
321 */ |
|
322 |
|
323 /*! |
|
324 \fn void QCameraExposureControl::isoSensitivityChanged(int value) |
|
325 |
|
326 Signal emitted when sensitity value changes to \a value. |
|
327 */ |
|
328 |
|
329 #include "moc_qcameraexposurecontrol.cpp" |
|
330 QTM_END_NAMESPACE |
|
331 |
|