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 <qcamerafocuscontrol.h> |
41 | #include "qmediacontrol_p.h" |
42 | |
43 | QT_BEGIN_NAMESPACE |
44 | |
45 | /*! |
46 | \class QCameraFocusControl |
47 | |
48 | |
49 | \brief The QCameraFocusControl class supplies control for |
50 | focusing related camera parameters. |
51 | |
52 | \inmodule QtMultimedia |
53 | |
54 | |
55 | \ingroup multimedia_control |
56 | |
57 | The interface name of QCameraFocusControl is \c org.qt-project.qt.camerafocuscontrol/5.0 as |
58 | defined in QCameraFocusControl_iid. |
59 | |
60 | |
61 | \sa QMediaService::requestControl(), QCamera |
62 | */ |
63 | |
64 | /*! |
65 | \macro QCameraFocusControl_iid |
66 | |
67 | \c org.qt-project.qt.camerafocuscontrol/5.0 |
68 | |
69 | Defines the interface name of the QCameraFocusControl class. |
70 | |
71 | \relates QCameraFocusControl |
72 | */ |
73 | |
74 | /*! |
75 | Constructs a camera control object with \a parent. |
76 | */ |
77 | |
78 | QCameraFocusControl::QCameraFocusControl(QObject *parent): |
79 | QMediaControl(*new QMediaControlPrivate, parent) |
80 | { |
81 | } |
82 | |
83 | /*! |
84 | Destruct the camera control object. |
85 | */ |
86 | |
87 | QCameraFocusControl::~QCameraFocusControl() |
88 | { |
89 | } |
90 | |
91 | |
92 | /*! |
93 | \fn QCameraFocus::FocusModes QCameraFocusControl::focusMode() const |
94 | |
95 | Returns the focus mode being used. |
96 | */ |
97 | |
98 | |
99 | /*! |
100 | \fn void QCameraFocusControl::setFocusMode(QCameraFocus::FocusModes mode) |
101 | |
102 | Set the focus mode to \a mode. |
103 | */ |
104 | |
105 | |
106 | /*! |
107 | \fn bool QCameraFocusControl::isFocusModeSupported(QCameraFocus::FocusModes mode) const |
108 | |
109 | Returns true if focus \a mode is supported. |
110 | */ |
111 | |
112 | /*! |
113 | \fn QCameraFocusControl::focusPointMode() const |
114 | |
115 | Returns the camera focus point selection mode. |
116 | */ |
117 | |
118 | /*! |
119 | \fn QCameraFocusControl::setFocusPointMode(QCameraFocus::FocusPointMode mode) |
120 | |
121 | Sets the camera focus point selection \a mode. |
122 | */ |
123 | |
124 | /*! |
125 | \fn QCameraFocusControl::isFocusPointModeSupported(QCameraFocus::FocusPointMode mode) const |
126 | |
127 | Returns true if the camera focus point \a mode is supported. |
128 | */ |
129 | |
130 | /*! |
131 | \fn QCameraFocusControl::customFocusPoint() const |
132 | |
133 | Return the position of custom focus point, in relative frame coordinates: |
134 | QPointF(0,0) points to the left top frame point, QPointF(0.5,0.5) points to the frame center. |
135 | |
136 | Custom focus point is used only in FocusPointCustom focus mode. |
137 | */ |
138 | |
139 | /*! |
140 | \fn QCameraFocusControl::setCustomFocusPoint(const QPointF &point) |
141 | |
142 | Sets the custom focus \a point. |
143 | |
144 | If camera supports fixed set of focus points, |
145 | it should use the nearest supported focus point, |
146 | and return the actual focus point with QCameraFocusControl::focusZones(). |
147 | |
148 | \sa QCameraFocusControl::customFocusPoint(), QCameraFocusControl::focusZones() |
149 | */ |
150 | |
151 | /*! |
152 | \fn QCameraFocusControl::focusZones() const |
153 | |
154 | Returns the list of zones, the camera is using for focusing or focused on. |
155 | */ |
156 | |
157 | /*! |
158 | \fn QCameraFocusControl::focusZonesChanged() |
159 | |
160 | Signal is emitted when the set of zones, camera focused on is changed. |
161 | |
162 | Usually the zones list is changed when the camera is focused. |
163 | |
164 | \sa QCameraFocusControl::focusZones() |
165 | */ |
166 | |
167 | /*! |
168 | \fn void QCameraFocusControl::focusModeChanged(QCameraFocus::FocusModes mode) |
169 | |
170 | Signal is emitted when the focus \a mode is changed, |
171 | usually in result of QCameraFocusControl::setFocusMode call or capture mode changes. |
172 | |
173 | \sa QCameraFocusControl::focusMode(), QCameraFocusControl::setFocusMode() |
174 | */ |
175 | |
176 | /*! |
177 | \fn void QCameraFocusControl::focusPointModeChanged(QCameraFocus::FocusPointMode mode) |
178 | |
179 | Signal is emitted when the focus point \a mode is changed, |
180 | usually in result of QCameraFocusControl::setFocusPointMode call or capture mode changes. |
181 | |
182 | \sa QCameraFocusControl::focusPointMode(), QCameraFocusControl::setFocusPointMode() |
183 | */ |
184 | |
185 | /*! |
186 | \fn void QCameraFocusControl::customFocusPointChanged(const QPointF &point) |
187 | |
188 | Signal is emitted when the custom focus \a point is changed. |
189 | |
190 | \sa QCameraFocusControl::customFocusPoint(), QCameraFocusControl::setCustomFocusPoint() |
191 | */ |
192 | |
193 | |
194 | |
195 | #include "moc_qcamerafocuscontrol.cpp" |
196 | QT_END_NAMESPACE |
197 | |
198 | |