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