connect(imageCapture, SIGNAL(readyForCaptureChanged(bool)), this, SLOT(readyForCapture(bool)));
connect(imageCapture, SIGNAL(imageCaptured(int,QImage)), this, SLOT(processCapturedImage(int,QImage)));
connect(imageCapture, SIGNAL(imageSaved(int,QString)), this, SLOT(imageSaved(int,QString)));
+ connect(imageCapture, SIGNAL(error(int,QCameraImageCapture::Error,QString)), this,
+ SLOT(displayCaptureError(int,QCameraImageCapture::Error,QString)));
connect(camera, SIGNAL(lockStatusChanged(QCamera::LockStatus, QCamera::LockChangeReason)),
this, SLOT(updateLockStatus(QCamera::LockStatus, QCamera::LockChangeReason)));
imageCapture->capture();
}
+void Camera::displayCaptureError(int id, const QCameraImageCapture::Error error, const QString &errorString)
+{
+ Q_UNUSED(id);
+ Q_UNUSED(error);
+ QMessageBox::warning(this, tr("Image Capture Error"), errorString);
+ isCapturingImage = false;
+}
+
void Camera::startCamera()
{
camera->start();
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QPushButton" name="takeImageButton">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<property name="text">
<string>Capture Photo</string>
</property>
<x>0</x>
<y>0</y>
<width>668</width>
- <height>29</height>
+ <height>25</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">