diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-01-04 09:31:49 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-01-21 19:56:38 +0000 |
commit | f8f33da7964977e30f8d2a3439a9058ba21bc798 (patch) | |
tree | d96edb4f609e491fd5933fa84b41ca58c1aca61e /src/multimedia/controls | |
parent | 4f7daef43da220869475d085ec2fb68083d53696 (diff) |
Merge the viewfindersettingscontrol into QCameraControl
Change-Id: I6410cc5fa9e787454a3ed61723b26238012aea6e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'src/multimedia/controls')
-rw-r--r-- | src/multimedia/controls/controls.pri | 2 | ||||
-rw-r--r-- | src/multimedia/controls/qcameracontrol.cpp | 24 | ||||
-rw-r--r-- | src/multimedia/controls/qcameracontrol.h | 5 | ||||
-rw-r--r-- | src/multimedia/controls/qcameraviewfindersettingscontrol.cpp | 105 | ||||
-rw-r--r-- | src/multimedia/controls/qcameraviewfindersettingscontrol.h | 74 |
5 files changed, 29 insertions, 181 deletions
diff --git a/src/multimedia/controls/controls.pri b/src/multimedia/controls/controls.pri index bcec75e5e..4c69176f8 100644 --- a/src/multimedia/controls/controls.pri +++ b/src/multimedia/controls/controls.pri @@ -12,7 +12,6 @@ PUBLIC_HEADERS += \ controls/qcamerafocuscontrol.h \ controls/qcameraimagecapturecontrol.h \ controls/qcameraimageprocessingcontrol.h \ - controls/qcameraviewfindersettingscontrol.h \ controls/qimageencodercontrol.h \ controls/qmediacontainercontrol.h \ controls/qmediaplayercontrol.h \ @@ -34,7 +33,6 @@ SOURCES += \ controls/qcamerafocuscontrol.cpp \ controls/qcameraimagecapturecontrol.cpp \ controls/qcameraimageprocessingcontrol.cpp \ - controls/qcameraviewfindersettingscontrol.cpp \ controls/qimageencodercontrol.cpp \ controls/qmediacontainercontrol.cpp \ controls/qmediaplayercontrol.cpp \ diff --git a/src/multimedia/controls/qcameracontrol.cpp b/src/multimedia/controls/qcameracontrol.cpp index 2468e9e2f..205f058df 100644 --- a/src/multimedia/controls/qcameracontrol.cpp +++ b/src/multimedia/controls/qcameracontrol.cpp @@ -221,6 +221,30 @@ QCameraControl::QCameraControl(QObject *parent) Signals the lock \a type \a status was changed with the specified \a reason. */ +/*! + \fn QCameraControl::supportedViewfinderSettings() const + + Returns a list of supported camera viewfinder settings. + + The list is ordered by preference; preferred settings come first. +*/ + +/*! + \fn QCameraControl::viewfinderSettings() const + + Returns the viewfinder settings. + + If undefined or unsupported values are passed to QCameraControl::setViewfinderSettings(), + this function returns the actual settings used by the camera viewfinder. These may be available + only once the camera is active. +*/ + +/*! + \fn QCameraControl::setViewfinderSettings(const QCameraViewfinderSettings &settings) + + Sets the camera viewfinder \a settings. +*/ + QT_END_NAMESPACE #include "moc_qcameracontrol.cpp" diff --git a/src/multimedia/controls/qcameracontrol.h b/src/multimedia/controls/qcameracontrol.h index d57b74937..9490b563b 100644 --- a/src/multimedia/controls/qcameracontrol.h +++ b/src/multimedia/controls/qcameracontrol.h @@ -81,6 +81,11 @@ public: virtual void searchAndLock(QCamera::LockTypes locks) = 0; virtual void unlock(QCamera::LockTypes locks) = 0; + virtual QList<QCameraViewfinderSettings> supportedViewfinderSettings() const = 0; + + virtual QCameraViewfinderSettings viewfinderSettings() const = 0; + virtual void setViewfinderSettings(const QCameraViewfinderSettings &settings) = 0; + Q_SIGNALS: void stateChanged(QCamera::State); void statusChanged(QCamera::Status); diff --git a/src/multimedia/controls/qcameraviewfindersettingscontrol.cpp b/src/multimedia/controls/qcameraviewfindersettingscontrol.cpp deleted file mode 100644 index a1936fdd5..000000000 --- a/src/multimedia/controls/qcameraviewfindersettingscontrol.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qcameraviewfindersettingscontrol.h" - -QT_BEGIN_NAMESPACE - -/*! - \class QCameraviewfinderSettingsControl - \inmodule QtMultimedia - \ingroup multimedia_control - \since 5.5 - - \brief The QCameraviewfinderSettingsControl class provides access to the viewfinder settings - of a camera media service. - - The functionality provided by this control is exposed to application code through the QCamera class. - - The interface name of QCameraviewfinderSettingsControl is \c org.qt-project.qt.cameraviewfinderSettingsControl/6.0 as - defined in QCameraViewfinderSettingsControl_iid. - - \sa QMediaService::requestControl(), QCameraViewfinderSettings, QCamera -*/ - -/*! - \macro QCameraViewfinderSettingsControl_iid - - \c org.qt-project.qt.cameraviewfinderSettingsControl/5.5 - - Defines the interface name of the QCameraviewfinderSettingsControl class. - - \relates QCameraviewfinderSettingsControl -*/ - -/*! - Constructs a camera viewfinder settings control object with \a parent. -*/ -QCameraViewfinderSettingsControl::QCameraViewfinderSettingsControl(QObject *parent) - : QObject(parent) -{ -} - -/*! - \fn QCameraviewfinderSettingsControl::supportedViewfinderSettings() const - - Returns a list of supported camera viewfinder settings. - - The list is ordered by preference; preferred settings come first. -*/ - -/*! - \fn QCameraviewfinderSettingsControl::viewfinderSettings() const - - Returns the viewfinder settings. - - If undefined or unsupported values are passed to QCameraviewfinderSettingsControl::setViewfinderSettings(), - this function returns the actual settings used by the camera viewfinder. These may be available - only once the camera is active. -*/ - -/*! - \fn QCameraviewfinderSettingsControl::setViewfinderSettings(const QCameraViewfinderSettings &settings) - - Sets the camera viewfinder \a settings. -*/ - -QT_END_NAMESPACE - -#include "moc_qcameraviewfindersettingscontrol.cpp" diff --git a/src/multimedia/controls/qcameraviewfindersettingscontrol.h b/src/multimedia/controls/qcameraviewfindersettingscontrol.h deleted file mode 100644 index 3c17b30f9..000000000 --- a/src/multimedia/controls/qcameraviewfindersettingscontrol.h +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - - -#ifndef QCAMERAVIEWFINDERSETTINGSCONTROL_H -#define QCAMERAVIEWFINDERSETTINGSCONTROL_H - -#include <QtMultimedia/qmediaservice.h> -#include <QtMultimedia/qcamera.h> - -QT_BEGIN_NAMESPACE - -// Required for QDoc workaround -class QString; - -// Required for QDoc workaround -class QString; - -class Q_MULTIMEDIA_EXPORT QCameraViewfinderSettingsControl : public QObject -{ - Q_OBJECT -public: - virtual QList<QCameraViewfinderSettings> supportedViewfinderSettings() const = 0; - - virtual QCameraViewfinderSettings viewfinderSettings() const = 0; - virtual void setViewfinderSettings(const QCameraViewfinderSettings &settings) = 0; - -protected: - explicit QCameraViewfinderSettingsControl(QObject *parent = nullptr); -}; - -#define QCameraViewfinderSettingsControl_iid "org.qt-project.qt.cameraviewfindersettingscontrol/6.0" -Q_MEDIA_DECLARE_CONTROL(QCameraViewfinderSettingsControl, QCameraViewfinderSettingsControl_iid) - -QT_END_NAMESPACE - -#endif // QCAMERAVIEWFINDERSETTINGSCONTROL_H |