Would fix the bug that device unlocks itself a while after being locked
by user by lock key.
Also moved to use normal pause when app goes background and not
unpausing when going foreground. Former way was bug risky.
The signal used would require QtMobility 1.2. That would lock the app
into extras-devel until 1.2 gets to extras, if ever.
pPauseAction_->setCheckable(true);
connect(pPauseAction_,SIGNAL(toggled(bool)),this,SLOT(pause(bool)));
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);
autopauseTimer.setSingleShot(true);
autopauseTimer.setInterval(15*60*1000);
{
pPauseAction_->setChecked(true);
}
{
pPauseAction_->setChecked(true);
}
+
+void SeaScene::handleDeviceLocked(bool isLocked)
+{
+ //pauses if locked but does not unpause if unlocked
+ if(isLocked)
+ {
+ pPauseAction_->setChecked(true);
+ }
+}
#include "level.h"
#include <QAction>
#include <QTimer>
#include "level.h"
#include <QAction>
#include <QTimer>
+#include <QSystemDeviceInfo>
+
+using namespace QtMobility;
class SeaScene : public QGraphicsScene
{
class SeaScene : public QGraphicsScene
{
+ void handleDeviceLocked(bool isLocked);
+
ScreenLitKeeper screenLitKeeper_;
ScreenLitKeeper screenLitKeeper_;
int menuItemCount_;
QGraphicsTextItem * pPausetextItem_;
int menuItemCount_;
QGraphicsTextItem * pPausetextItem_;
+ QSystemDeviceInfo deviceInfo_;
+
connect(this,SIGNAL(screenTapped()),pScene_,SLOT(handleScreenTapped()));
connect(this,SIGNAL(screenTapped()),pScene_,SLOT(handleScreenTapped()));
- connect(this,SIGNAL(goingBackgroung()),pScene_,SLOT(forcePause()));
- connect(this,SIGNAL(goingForeground()),pScene_,SLOT(softContinue()));
+ connect(this,SIGNAL(goingBackgroung()),pScene_,SLOT(turnPauseOn()));
+// connect(this,SIGNAL(goingForeground()),pScene_,SLOT(softContinue()));
connect(pScene_,SIGNAL(minimizeRequested()),this,SLOT(showNormal()));
connect(pScene_,SIGNAL(fullscreenRequested()),this,SLOT(showFullScreen()));
connect(pScene_,SIGNAL(minimizeRequested()),this,SLOT(showNormal()));
connect(pScene_,SIGNAL(fullscreenRequested()),this,SLOT(showFullScreen()));