|
2010-10-11
, 07:55
|
Posts: 111 |
Thanked: 9 times |
Joined on May 2010
|
#82
|
|
2010-10-11
, 08:23
|
Posts: 62 |
Thanked: 178 times |
Joined on Sep 2010
|
#83
|
|
2010-10-11
, 08:49
|
Posts: 111 |
Thanked: 9 times |
Joined on May 2010
|
#84
|
|
2010-10-11
, 08:53
|
Posts: 1,397 |
Thanked: 2,126 times |
Joined on Nov 2009
@ Dublin, Ireland
|
#85
|
|
2010-10-11
, 09:40
|
Posts: 62 |
Thanked: 178 times |
Joined on Sep 2010
|
#86
|
|
2010-10-11
, 12:02
|
Posts: 17 |
Thanked: 8 times |
Joined on Jul 2010
|
#87
|
|
2010-10-11
, 14:56
|
Posts: 62 |
Thanked: 178 times |
Joined on Sep 2010
|
#88
|
The Following User Says Thank You to Xawotihs For This Useful Post: | ||
|
2010-10-11
, 15:38
|
Posts: 249 |
Thanked: 167 times |
Joined on Mar 2010
@ International
|
#89
|
|
2010-10-11
, 15:59
|
Posts: 237 |
Thanked: 193 times |
Joined on Feb 2010
@ Brighton, UK
|
#90
|
@Nnexxus, it's an interesting idea. I've heard about such feature required for each application on Android. On Maemo, it would make sense to have the same thing. Everything in Wagic works with a timer that refreshes the UI and performs all the computation.
I could perfectly stop/start this timer up reception of some system events (Phone locked or app in the background). Anybody who has already developed such feature for its app with a pointer on how to do that with Qt on Maemo ?
#include <mce/dbus-names.h> #include <mce/mode-names.h> #include <QDBusConnection> #include <QDBusMessage> #include <QDBusInterface> QDBusConnection CLASS_NAME::dBusConnection = QDBusConnection::systemBus(); QDBusInterface* CLASS_NAME::dBusInterface = new QDBusInterface(MCE_SERVICE, MCE_REQUEST_PATH, MCE_REQUEST_IF, dBusConnection); // in constructor // Handle screen state on / off dBusConnection.connect(MCE_SERVICE, MCE_SIGNAL_PATH, MCE_SIGNAL_IF, MCE_DISPLAY_SIG, this, SLOT(displayStateChanged(const QDBusMessage &))); // SLOT void CLASS_NAME::displayStateChanged(const QDBusMessage &message) { QString state = message.arguments().at(0).toString(); if (!state.isEmpty()) { if (state == MCE_DISPLAY_ON_STRING) { // DO SOMETHING TO START TIMER } else if (state == MCE_DISPLAY_OFF_STRING) { // DO SOMETHING TO STOP TIMER } } }
Tags |
bada blows, bada rox, question |
|
Please no accelerometer unless you can rule out accidental movement. (requiring the player to throw the device a few meters in the air in order to move to next phase or something )