Exemplo n.º 1
0
// define SystemSuspendPrivate
SystemSuspendPrivate::SystemSuspendPrivate(QObject *parent)
: SystemSuspend(parent), handlersValid(false), waitingOn(0)
{
    SuspendService *s = new SuspendService(this);
    QObject::connect(s, SIGNAL(doSuspend()), this, SLOT(suspendSystem()));

    QtopiaInputEvents::addKeyboardFilter(this);
#ifdef Q_WS_QWS
    QtopiaServerApplication::instance()->installQWSEventFilter(this);
#endif
}
Exemplo n.º 2
0
bool KJob::suspend()
{
    Q_D(KJob);
    if ( !d->suspended )
    {
        if ( doSuspend() )
        {
            d->suspended = true;
            emit suspended(this);

            return true;
        }
    }

    return false;
}
Exemplo n.º 3
0
/*!
  Enter the suspend state.

  This slot corresponds to the QCop service message \c {Suspend::suspend()}.
 */
void SuspendService::suspend()
{
    emit doSuspend();
}