1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU Lesser General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU Lesser
19** General Public License version 3 as published by the Free Software
20** Foundation and appearing in the file LICENSE.LGPL3 included in the
21** packaging of this file. Please review the following information to
22** ensure the GNU Lesser General Public License version 3 requirements
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24**
25** GNU General Public License Usage
26** Alternatively, this file may be used under the terms of the GNU
27** General Public License version 2.0 or (at your option) the GNU General
28** Public license version 3 or any later version approved by the KDE Free
29** Qt Foundation. The licenses are as published by the Free Software
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31** included in the packaging of this file. Please review the following
32** information to ensure the GNU General Public License requirements will
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34** https://www.gnu.org/licenses/gpl-3.0.html.
35**
36** $QT_END_LICENSE$
37**
38****************************************************************************/
39
40#include <qcameraexposurecontrol.h>
41#include "qmediacontrol_p.h"
42
43QT_BEGIN_NAMESPACE
44
45/*!
46 \class QCameraExposureControl
47
48 \brief The QCameraExposureControl class allows controlling camera exposure parameters.
49
50 \inmodule QtMultimedia
51
52 \ingroup multimedia_control
53
54 The QCameraExposure class is the usual method of adjusting exposure related parameters
55 when using camera functionality. This class provides a more complete but less easy
56 to use interface, and also forms the interface to implement when writing a new
57 implementation of QCamera functionality.
58
59 You can adjust a number of parameters that will affect images and video taken with
60 the corresponding QCamera object - see the \l {QCameraExposureControl::ExposureParameter}{ExposureParameter} enumeration.
61
62 The interface name of QCameraExposureControl is \c org.qt-project.qt.cameraexposurecontrol/5.0 as
63 defined in QCameraExposureControl_iid.
64
65 \sa QCameraExposure, QCamera
66*/
67
68/*!
69 \macro QCameraExposureControl_iid
70
71 \c org.qt-project.qt.cameraexposurecontrol/5.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*/
81QCameraExposureControl::QCameraExposureControl(QObject *parent):
82 QMediaControl(*new QMediaControlPrivate, parent)
83{
84}
85
86/*!
87 Destroys the camera exposure control object.
88*/
89QCameraExposureControl::~QCameraExposureControl()
90{
91}
92
93/*!
94 \enum QCameraExposureControl::ExposureParameter
95 \value ISO
96 Camera ISO sensitivity, specified as integer value.
97 \value Aperture
98 Lens aperture is specified as an qreal F number.
99 The supported apertures list can change depending on the focal length,
100 in such a case the exposureParameterRangeChanged() signal is emitted.
101 \value ShutterSpeed
102 Shutter speed in seconds, specified as qreal.
103 \value ExposureCompensation
104 Exposure compensation, specified as qreal EV value.
105 \value FlashPower
106 Manual flash power, specified as qreal value.
107 Accepted power range is [0..1.0],
108 with 0 value means no flash and 1.0 corresponds to full flash power.
109
110 This value is only used in the \l{QCameraExposure::FlashManual}{manual flash mode}.
111 \value TorchPower
112 Manual torch power, specified as qreal value.
113 Accepted power range is [0..1.0],
114 with 0 value means no light and 1.0 corresponds to full torch power.
115
116 This value is only used in the \l{QCameraExposure::FlashTorch}{torch flash mode}.
117 \value FlashCompensation
118 Flash compensation, specified as qreal EV value.
119 \value SpotMeteringPoint
120 The relative frame coordinate of the point to use for exposure metering
121 in spot metering mode, specified as a QPointF.
122 \value ExposureMode
123 Camera exposure mode.
124 \value MeteringMode
125 Camera metering mode.
126 \value ExtendedExposureParameter
127 The base value for platform specific extended parameters.
128 For such parameters the sequential values starting from ExtendedExposureParameter should be used.
129*/
130
131/*!
132 \fn QCameraExposureControl::isParameterSupported(ExposureParameter parameter) const
133
134 Returns true is exposure \a parameter is supported by backend.
135 \since 5.0
136*/
137
138/*!
139 \fn QCameraExposureControl::requestedValue(ExposureParameter parameter) const
140
141 Returns the requested exposure \a parameter value.
142
143 \since 5.0
144*/
145
146/*!
147 \fn QCameraExposureControl::actualValue(ExposureParameter parameter) const
148
149 Returns the actual exposure \a parameter value, or invalid QVariant() if the value is unknown or not supported.
150
151 The actual parameter value may differ for the requested one if automatic mode is selected or
152 camera supports only limited set of values within the supported range.
153 \since 5.0
154*/
155
156
157/*!
158 \fn QCameraExposureControl::supportedParameterRange(ExposureParameter parameter, bool *continuous = 0) const
159
160 Returns the list of supported \a parameter values;
161
162 If the camera supports arbitrary exposure parameter value within the supported range,
163 *\a continuous is set to true, otherwise *\a continuous is set to false.
164
165 \since 5.0
166*/
167
168/*!
169 \fn bool QCameraExposureControl::setValue(ExposureParameter parameter, const QVariant& value)
170
171 Set the exposure \a parameter to \a value.
172 If a null or invalid QVariant is passed, backend should choose the value automatically,
173 and if possible report the actual value to user with QCameraExposureControl::actualValue().
174
175 Returns true if parameter is supported and value is correct.
176 \since 5.0
177*/
178
179/*!
180 \fn void QCameraExposureControl::requestedValueChanged(int parameter)
181
182 Signal emitted when the requested exposure \a parameter value has changed,
183 usually in result of setValue() call.
184 \since 5.0
185*/
186
187/*!
188 \fn void QCameraExposureControl::actualValueChanged(int parameter)
189
190 Signal emitted when the actual exposure \a parameter value has changed,
191 usually in result of auto exposure algorithms or manual exposure parameter applied.
192
193 \since 5.0
194*/
195
196/*!
197 \fn void QCameraExposureControl::parameterRangeChanged(int parameter)
198
199 Signal emitted when the supported range of exposure \a parameter values has changed.
200
201 \since 5.0
202*/
203
204
205#include "moc_qcameraexposurecontrol.cpp"
206QT_END_NAMESPACE
207
208