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 <qcameraimagecapturecontrol.h>
41#include <QtCore/qstringlist.h>
42
43QT_BEGIN_NAMESPACE
44
45/*!
46 \class QCameraImageCaptureControl
47
48 \brief The QCameraImageCaptureControl class provides a control interface
49 for image capture services.
50
51 \inmodule QtMultimedia
52
53
54 \ingroup multimedia_control
55
56 The interface name of QCameraImageCaptureControl is \c org.qt-project.qt.cameraimagecapturecontrol/5.0 as
57 defined in QCameraImageCaptureControl_iid.
58
59
60 \sa QMediaService::requestControl()
61*/
62
63/*!
64 \macro QCameraImageCaptureControl_iid
65
66 \c org.qt-project.qt.cameraimagecapturecontrol/5.0
67
68 Defines the interface name of the QCameraImageCaptureControl class.
69
70 \relates QCameraImageCaptureControl
71*/
72
73/*!
74 Constructs a new image capture control object with the given \a parent
75*/
76QCameraImageCaptureControl::QCameraImageCaptureControl(QObject *parent)
77 :QMediaControl(parent)
78{
79}
80
81/*!
82 Destroys an image capture control.
83*/
84QCameraImageCaptureControl::~QCameraImageCaptureControl()
85{
86}
87
88/*!
89 \fn QCameraImageCaptureControl::isReadyForCapture() const
90
91 Identifies if a capture control is ready to perform a capture
92 immediately (all the resources necessary for image capture are allocated,
93 hardware initialized, flash is charged, etc).
94
95 Returns true if the camera is ready for capture; and false if it is not.
96
97 It's permissible to call capture() while the camera status is QCamera::ActiveStatus
98 regardless of isReadyForCapture property value.
99 If camera is not ready to capture image immediately,
100 the capture request is queued with all the related camera settings
101 to be executed as soon as possible.
102*/
103
104/*!
105 \fn QCameraImageCaptureControl::readyForCaptureChanged(bool ready)
106
107 Signals that a capture control's \a ready state has changed.
108*/
109
110/*!
111 \fn QCameraImageCaptureControl::capture(const QString &fileName)
112
113 Initiates the capture of an image to \a fileName.
114 The \a fileName can be relative or empty,
115 in this case the service should use the system specific place
116 and file naming scheme.
117
118 The Camera service should save all the capture parameters
119 like exposure settings or image processing parameters,
120 so changes to camera parameters after capture() is called
121 do not affect previous capture requests.
122
123 Returns the capture request id number, which is used later
124 with imageExposed(), imageCaptured() and imageSaved() signals.
125*/
126
127/*!
128 \fn QCameraImageCaptureControl::cancelCapture()
129
130 Cancel pending capture requests.
131*/
132
133/*!
134 \fn QCameraImageCaptureControl::imageExposed(int requestId)
135
136 Signals that an image with it \a requestId
137 has just been exposed.
138 This signal can be used for the shutter sound or other indicaton.
139*/
140
141/*!
142 \fn QCameraImageCaptureControl::imageCaptured(int requestId, const QImage &preview)
143
144 Signals that an image with it \a requestId
145 has been captured and a \a preview is available.
146*/
147
148/*!
149 \fn QCameraImageCaptureControl::imageMetadataAvailable(int id, const QString &key, const QVariant &value)
150
151 Signals that a metadata for an image with request \a id is available. Signal
152 also contains the \a key and \a value of the metadata.
153
154 This signal should be emitted between imageExposed and imageSaved signals.
155*/
156
157/*!
158 \fn QCameraImageCaptureControl::imageAvailable(int requestId, const QVideoFrame &buffer)
159
160 Signals that a captured \a buffer with a \a requestId is available.
161*/
162
163/*!
164 \fn QCameraImageCaptureControl::imageSaved(int requestId, const QString &fileName)
165
166 Signals that a captured image with a \a requestId has been saved
167 to \a fileName.
168*/
169
170/*!
171 \fn QCameraImageCaptureControl::driveMode() const
172
173 Returns the current camera drive mode.
174*/
175
176/*!
177 \fn QCameraImageCaptureControl::setDriveMode(QCameraImageCapture::DriveMode mode)
178
179 Sets the current camera drive \a mode.
180*/
181
182
183/*!
184 \fn QCameraImageCaptureControl::error(int id, int error, const QString &errorString)
185
186 Signals the capture request \a id failed with \a error code and message \a errorString.
187
188 \sa QCameraImageCapture::Error
189*/
190
191
192#include "moc_qcameraimagecapturecontrol.cpp"
193QT_END_NAMESPACE
194
195