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

source code of qtmultimedia/src/multimedia/controls/qcameraimagecapturecontrol.cpp