Should pause at device lock
[ghostsoverboard] / seascene.cpp
index 5d1273f..b29c068 100644 (file)
@@ -89,6 +89,8 @@ SeaScene::SeaScene(QObject *parent) :
     pPauseAction_->setCheckable(true);
     connect(pPauseAction_,SIGNAL(toggled(bool)),this,SLOT(pause(bool)));
 
+    connect(&deviceInfo_,SIGNAL(lockStatusChanged(bool)),this,SLOT(handleDeviceLocked(bool)));
+
 
     autopauseTimer.setSingleShot(true);
     autopauseTimer.setInterval(15*60*1000);
@@ -712,3 +714,12 @@ void SeaScene::turnPauseOn()
 {
     pPauseAction_->setChecked(true);
 }
+
+void SeaScene::handleDeviceLocked(bool isLocked)
+{
+    //pauses if locked but does not unpause if unlocked
+    if(isLocked)
+    {
+        pPauseAction_->setChecked(true);
+    }
+}