Added a function to reset all capabilities
[harmattan/cameraplus] / lib / qtcamdevice.cpp
index 17620bc..93139e3 100644 (file)
@@ -48,8 +48,15 @@ QtCamDevice::QtCamDevice(QtCamConfig *config, const QString& name,
 
   QObject::connect(d_ptr->listener, SIGNAL(error(const QString&, int, const QString&)),
                   this, SLOT(_d_error(const QString&, int, const QString&)));
-  QObject::connect(d_ptr->listener, SIGNAL(started()), this, SIGNAL(started()));
-  QObject::connect(d_ptr->listener, SIGNAL(stopped()), this, SIGNAL(stopped()));
+  QObject::connect(d_ptr->listener, SIGNAL(started()), this, SLOT(_d_started()));
+  QObject::connect(d_ptr->listener, SIGNAL(stopped()), this, SLOT(_d_stopped()));
+  QObject::connect(d_ptr->listener, SIGNAL(stopping()), this, SLOT(_d_stopping()));
+
+  g_signal_connect(d_ptr->cameraBin, "notify::idle",
+                  G_CALLBACK(QtCamDevicePrivate::on_idle_changed), d_ptr);
+
+  g_signal_connect(d_ptr->wrapperVideoSource, "notify::ready-for-capture",
+                  G_CALLBACK(QtCamDevicePrivate::on_ready_for_capture_changed), d_ptr);
 
   d_ptr->image = new QtCamImageMode(d_ptr, this);
   d_ptr->video = new QtCamVideoMode(d_ptr, this);