void AutoBarcodeScanner::createConnections() { // error handling connect(m_camera, SIGNAL(error(QCamera::Error)), this, SLOT(slotCameraError(QCamera::Error))); // for debugging connect(m_camera, SIGNAL(statusChanged(QCamera::Status)), this, SLOT(slotStatusChanged(QCamera::Status))); connect(m_camera, SIGNAL(stateChanged(QCamera::State)), this, SLOT(slotStateChanged(QCamera::State))); }
void BarcodeScanner::createConnections() { // init connections connect(camera, SIGNAL(lockStatusChanged(QCamera::LockStatus, QCamera::LockChangeReason)), this, SLOT(slotLockStatusChanged(QCamera::LockStatus))); connect(imageCapture, SIGNAL(imageSaved(int, QString)), this, SLOT(slotImageSaved())); // error handling connect(camera, SIGNAL(lockFailed()), this, SLOT(slotLockFailed())); connect(imageCapture, SIGNAL(error(int, QCameraImageCapture::Error, const QString&)), this, SLOT(slotCaptureFailed())); connect(camera, SIGNAL(error(QCamera::Error)), this, SLOT(slotCameraError(QCamera::Error))); // to stop camera after scan process if necessary connect(this, SIGNAL(decodingFinished(const QString)), this, SLOT(slotDecodingFinished())); // for debugging connect(camera, SIGNAL(statusChanged(QCamera::Status)), this, SLOT(slotStatusChanged(QCamera::Status))); connect(camera, SIGNAL(stateChanged(QCamera::State)), this, SLOT(slotStateChanged(QCamera::State))); }