QObject::connect(m_dev, SIGNAL(runningStateChanged(bool)),
this, SIGNAL(runningStateChanged()));
QObject::connect(m_dev, SIGNAL(idleStateChanged(bool)), this, SIGNAL(idleStateChanged()));
+ QObject::connect(m_dev, SIGNAL(error(const QString&, int, const QString&)),
+ this, SIGNAL(error(const QString&, int, const QString&)));
emit deviceIdChanged();
emit deviceChanged();
void modeChanged();
void idleStateChanged();
void runningStateChanged();
+ void error(const QString& message, int code, const QString& debug);
protected:
void geometryChanged(const QRectF& newGeometry, const QRectF& oldGeometry);
id: cam
anchors.fill: parent
+ onError: {
+ console.log("Camera error (" + code + "): " + message + " " + debug);
+ showError(qsTr("Camera error. Please restart the application."));
+ cam.stop();
+ }
+
// TODO: hardcoding device id
Component.onCompleted: { cam.deviceId = 0; mode = settings.mode; }