Home · All Classes · Grouped Classes · Annotated · Functions

UIApplicationMonitor Class Reference

The UIApplicationMonitor class monitors the running state of UI applications. More...

    #include <UIApplicationMonitor>

Inherits QObject.

Public Types

Public Functions

Signals

Static Public Members

Additional Inherited Members


Detailed Description

The UIApplicationMonitor class monitors the running state of UI applications.

The UI application monitor provides a friendly interface to monitoring the state of UI applications. The UIApplicationMonitor class uses the following messages to monitor application state.

To ApplicationFrom ApplicationDescription
raise()QPE/QtopiaApplication:appRaised(QString)Used to raise, and confirm the raise of, the application UI.
QPE/QtopiaApplication:busy(QString)The application has notified the system that it is busy.
QPE/QtopiaApplication:notBusy(QString)The application has notified the system that it is not busy.

Additionally the UIApplicationMonitor class uses the following value space keys to monitor application state.

Value Space KeyDescription
/System/Applications/<app name>/Tasks/UITrue when the application is showing UI, false if not.

This class is part of the Qtopia server and cannot be used by other Qtopia applications.


Member Type Documentation

enum UIApplicationMonitor::ApplicationState

The ApplicationState enum represents the current state of a UI application.

Every application will have at least on of the following states:

ConstantValueDescription
UIApplicationMonitor::NotRunning0x0000The application is not currently running, does not appear to be a UI application, or is not currently showing a UI. An application is considered not running whenever the value space key /System/Applications/<application>/Tasks/UI is false.
UIApplicationMonitor::Starting0x0001The application is currently starting, in response to a raise() message. The busy flag is automatically set for applications in the Starting state. It is unset when they enter the Running state or terminate.
UIApplicationMonitor::Running0x0002The application is running and displaying a UI. An application is considered running whenever the value space key /System/Applications/<application>/Tasks/UI is true.

Additionally, zero or more of the following flags may be applied to any application in the Starting or Running state.

ConstantValueDescription
UIApplicationMonitor::NotResponding0x0100The application is not responding. An application is marked as not responding if it does not send an appRaised(QString) message in response to a raise() message within the notRespondingTimeout() time limit.
UIApplicationMonitor::Busy0x0200The application is busy.
UIApplicationMonitor::Active0x0400The application is active. The active application is the application that created the currently active window.

The following masks are also supported.

ConstantValueDescription
UIApplicationMonitor::StateMask0x00FFMasks the enumeration bits used by application states.


Member Function Documentation

UIApplicationMonitor::UIApplicationMonitor ( QObject * parent = 0 )

Construct a new UIApplicationMonitor instance with the provided parent.

UIApplicationMonitor::~UIApplicationMonitor ()   [virtual]

Destroy the UIApplicationMonitor instance.

ApplicationState UIApplicationMonitor::applicationState ( const QString & application ) const

Returns the current state of application.

void UIApplicationMonitor::applicationStateChanged ( const QString & application, UIApplicationMonitor::ApplicationState newState )   [signal]

Emitted whenever application's state changes. newState will be set to the application's new state.

void UIApplicationMonitor::busy ()   [signal]

Emitted when any application is busy.

QStringList UIApplicationMonitor::busyApplications () const

Return a list of all busy applications.

void UIApplicationMonitor::notBusy ()   [signal]

Emitted when no applications are busy.

QStringList UIApplicationMonitor::notRespondingApplications () const

Return a list of all not responding applications.

int UIApplicationMonitor::notRespondingTimeout ()   [static]

Returns the current not responding timeout in milliseconds.

See also setNotRespondingTimeout().

QStringList UIApplicationMonitor::runningApplications () const

Return a list of all running UI applications. An application is "running" if it is showing a UI.

void UIApplicationMonitor::setNotRespondingTimeout ( int timeout )   [static]

Set the not responding timeout to timeout milliseconds.

See also notRespondingTimeout().


Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3