libbb/Application_asleep.cpp

This example illustrates how to connect to the Application asleep signal in C++.
#include <bb/Application>
#include <QObject>

class TestObject: public QObject {
Q_OBJECT
public Q_SLOTS:
    void onAsleep();
};

void TestObject::onAsleep() {
    // Do something here
}

int main(int argc, char **argv) {
    bb::Application app(argc, argv);
    TestObject testObject;

    QObject::connect(&app, SIGNAL( asleep() ), &testObject, SLOT( onAsleep() ));

    return app.exec();
}

Overview

Last modified: 2014-03-13

comments powered by Disqus