My Project
unity::shell::application::ApplicationManagerInterface Class Referenceabstract

The Application manager. More...

#include <unity/shell/application/ApplicationManagerInterface.h>

Inheritance diagram for unity::shell::application::ApplicationManagerInterface:
Collaboration diagram for unity::shell::application::ApplicationManagerInterface:

Public Types

enum  Roles {
  RoleAppId = Qt::UserRole, RoleName, RoleComment, RoleIcon,
  RoleState, RoleFocused, RoleIsTouchApp, RoleExemptFromLifecycle,
  RoleApplication
}
 The Roles supported by the model. More...
 

Signals

void focusRequested (const QString &appId)
 Will be emitted right before the focused application changes. More...
 
void focusedApplicationIdChanged ()
 Will be emitted whenever the focused application changes.
 

Public Member Functions

virtual Q_INVOKABLE unity::shell::application::ApplicationInfoInterfaceget (int index) const =0
 Get an ApplicationInfo item (using stack index). More...
 
virtual Q_INVOKABLE unity::shell::application::ApplicationInfoInterfacefindApplication (const QString &appId) const =0
 Get an ApplicationInfo item (using the appId). More...
 
virtual ApplicationInfoInterfacefindApplicationWithSurface (MirSurfaceInterface *surface) const =0
 
virtual Q_INVOKABLE bool requestFocusApplication (const QString &appId)=0
 Request to focus a given application. More...
 
virtual Q_INVOKABLE unity::shell::application::ApplicationInfoInterfacestartApplication (const QString &appId, const QStringList &arguments)=0
 Start an application. More...
 
virtual Q_INVOKABLE bool stopApplication (const QString &appId)=0
 Stops an application. More...
 

Properties

int count
 The count of the applications known to the manager. More...
 
QString focusedApplicationId
 The currently focused application. More...
 

Detailed Description

The Application manager.

This is the main class to interact with Applications

Member Enumeration Documentation

◆ Roles

The Roles supported by the model.

See ApplicationInfoInterface properties for details.

Member Function Documentation

◆ findApplication()

virtual Q_INVOKABLE unity::shell::application::ApplicationInfoInterface* unity::shell::application::ApplicationManagerInterface::findApplication ( const QString &  appId) const
pure virtual

Get an ApplicationInfo item (using the appId).

Note: QML requires the full namespace in the return value.

Parameters
appIdthe appId of the item to get
Returns
The item, or null if not found.

◆ focusRequested

void unity::shell::application::ApplicationManagerInterface::focusRequested ( const QString &  appId)
signal

Will be emitted right before the focused application changes.

This can be used to prepare for an upcoming focus change. For example starting an animation.

◆ get()

virtual Q_INVOKABLE unity::shell::application::ApplicationInfoInterface* unity::shell::application::ApplicationManagerInterface::get ( int  index) const
pure virtual

Get an ApplicationInfo item (using stack index).

Note: QML requires the full namespace in the return value.

Parameters
indexthe index of the item to get
Returns
The item, or null if not found.

◆ requestFocusApplication()

virtual Q_INVOKABLE bool unity::shell::application::ApplicationManagerInterface::requestFocusApplication ( const QString &  appId)
pure virtual

Request to focus a given application.

This will request the shell to focus the given application.

Parameters
appIdThe appId of the app to be focused.
Returns
True if the request will processed, false if it was discarded (i.e. the given appid could not be found)

◆ startApplication()

virtual Q_INVOKABLE unity::shell::application::ApplicationInfoInterface* unity::shell::application::ApplicationManagerInterface::startApplication ( const QString &  appId,
const QStringList &  arguments 
)
pure virtual

Start an application.

Parameters
appIdThe appId for the application to be spawned.
argumentsAny arguments to be passed to the process.
Returns
The created application item if start successful, else null.

◆ stopApplication()

virtual Q_INVOKABLE bool unity::shell::application::ApplicationManagerInterface::stopApplication ( const QString &  appId)
pure virtual

Stops an application.

Parameters
appIdThe application to be stopped.
Returns
True if application stop successful, else false (i.e. false if application was not running).

Property Documentation

◆ count

int unity::shell::application::ApplicationManagerInterface::count
read

The count of the applications known to the manager.

This is the same as rowCount, added in order to keep compatibility with QML ListModels.

◆ focusedApplicationId

QString unity::shell::application::ApplicationManagerInterface::focusedApplicationId
read

The currently focused application.

Use focusApplication() and unfocusCurrentApplication() to modify this.


The documentation for this class was generated from the following file: