@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 } } }