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 <qcamerazoomcontrol.h>
41#include "qmediacontrol_p.h"
42
43QT_BEGIN_NAMESPACE
44
45/*!
46 \class QCameraZoomControl
47
48
49 \brief The QCameraZoomControl class supplies control for
50 optical and digital camera zoom.
51
52 \inmodule QtMultimedia
53
54
55 \ingroup multimedia_control
56
57 The interface name of QCameraZoomControl is \c org.qt-project.qt.camerazoomcontrol/5.0 as
58 defined in QCameraZoomControl_iid.
59
60
61 \sa QMediaService::requestControl(), QCamera
62*/
63
64/*!
65 \macro QCameraZoomControl_iid
66
67 \c org.qt-project.qt.camerazoomcontrol/5.0
68
69 Defines the interface name of the QCameraZoomControl class.
70
71 \relates QCameraZoomControl
72*/
73
74/*!
75 Constructs a camera zoom control object with \a parent.
76*/
77
78QCameraZoomControl::QCameraZoomControl(QObject *parent):
79 QMediaControl(*new QMediaControlPrivate, parent)
80{
81}
82
83/*!
84 Destruct the camera zoom control object.
85*/
86
87QCameraZoomControl::~QCameraZoomControl()
88{
89}
90
91/*!
92 \fn qreal QCameraZoomControl::maximumOpticalZoom() const
93
94 Returns the maximum optical zoom value, or 1.0 if optical zoom is not supported.
95*/
96
97
98/*!
99 \fn qreal QCameraZoomControl::maximumDigitalZoom() const
100
101 Returns the maximum digital zoom value, or 1.0 if digital zoom is not supported.
102*/
103
104
105/*!
106 \fn qreal QCameraZoomControl::requestedOpticalZoom() const
107
108 Return the requested optical zoom value.
109*/
110
111/*!
112 \fn qreal QCameraZoomControl::requestedDigitalZoom() const
113
114 Return the requested digital zoom value.
115*/
116
117/*!
118 \fn qreal QCameraZoomControl::currentOpticalZoom() const
119
120 Return the current optical zoom value.
121*/
122
123/*!
124 \fn qreal QCameraZoomControl::currentDigitalZoom() const
125
126 Return the current digital zoom value.
127*/
128
129/*!
130 \fn void QCameraZoomControl::zoomTo(qreal optical, qreal digital)
131
132 Sets \a optical and \a digital zoom values.
133
134 Zooming can be asynchronous with value changes reported with
135 currentDigitalZoomChanged() and currentOpticalZoomChanged() signals.
136
137 The backend should expect and correctly handle frequent zoomTo() calls
138 during zoom animations or slider movements.
139*/
140
141
142/*!
143 \fn void QCameraZoomControl::currentOpticalZoomChanged(qreal zoom)
144
145 Signal emitted when the current optical \a zoom value changed.
146*/
147
148/*!
149 \fn void QCameraZoomControl::currentDigitalZoomChanged(qreal zoom)
150
151 Signal emitted when the current digital \a zoom value changed.
152*/
153
154/*!
155 \fn void QCameraZoomControl::requestedOpticalZoomChanged(qreal zoom)
156
157 Signal emitted when the requested optical \a zoom value changed.
158*/
159
160/*!
161 \fn void QCameraZoomControl::requestedDigitalZoomChanged(qreal zoom)
162
163 Signal emitted when the requested digital \a zoom value changed.
164*/
165
166
167/*!
168 \fn void QCameraZoomControl::maximumOpticalZoomChanged(qreal zoom)
169
170 Signal emitted when the maximum supported optical \a zoom value changed.
171
172 The maximum supported zoom value can depend on other camera settings,
173 like focusing mode.
174*/
175
176/*!
177 \fn void QCameraZoomControl::maximumDigitalZoomChanged(qreal zoom)
178
179 Signal emitted when the maximum supported digital \a zoom value changed.
180
181 The maximum supported zoom value can depend on other camera settings,
182 like capture mode or resolution.
183*/
184
185#include "moc_qcamerazoomcontrol.cpp"
186QT_END_NAMESPACE
187
188