diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-04-15 10:18:43 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-04-19 11:06:54 +0000 |
commit | 0ca672235b097937f32d2960e4a8ca3e323074db (patch) | |
tree | c7990c15714e373a8271c6ab168a55207098fcba /examples | |
parent | 8d0cd064a0272b0d7a005738f0a08c5e3b8e7281 (diff) |
New QML API for image capturing
Adjust the QML API for image capturing to fit with the new
handling of capture sessions. Simplify some things and
avoid using a wrapper class to the largest degree by
inheriting from QCameraImageCapture.
Remove the old image capturing code.
Change-Id: Ic99116f5202f2d0438fe0d048be2faa6687f0e4b
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/multimediawidgets/camera/camera.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/multimediawidgets/camera/camera.cpp b/examples/multimediawidgets/camera/camera.cpp index cf211534e..b7cbd936a 100644 --- a/examples/multimediawidgets/camera/camera.cpp +++ b/examples/multimediawidgets/camera/camera.cpp @@ -131,8 +131,7 @@ void Camera::setCamera(const QCameraInfo &cameraInfo) connect(m_imageCapture, &QCameraImageCapture::readyForCaptureChanged, this, &Camera::readyForCapture); connect(m_imageCapture, &QCameraImageCapture::imageCaptured, this, &Camera::processCapturedImage); connect(m_imageCapture, &QCameraImageCapture::imageSaved, this, &Camera::imageSaved); - connect(m_imageCapture, QOverload<int, QCameraImageCapture::Error, const QString &>::of(&QCameraImageCapture::error), - this, &Camera::displayCaptureError); + connect(m_imageCapture, &QCameraImageCapture::errorOccurred, this, &Camera::displayCaptureError); readyForCapture(m_imageCapture->isReadyForCapture()); QCameraImageProcessing *imageProcessing = m_camera->imageProcessing(); @@ -271,7 +270,7 @@ void Camera::setMuted(bool muted) void Camera::takeImage() { m_isCapturingImage = true; - m_imageCapture->capture(); + m_imageCapture->captureToFile(); } void Camera::displayCaptureError(int id, const QCameraImageCapture::Error error, const QString &errorString) |