My Project
|
The Application manager. More...
#include <unity/shell/application/ApplicationManagerInterface.h>
Public Types | |
enum | Roles { RoleAppId = Qt::UserRole, RoleName, RoleComment, RoleIcon, RoleStage, RoleState, RoleFocused } |
The Roles supported by the model. More... | |
Signals | |
void | focusedApplicationIdChanged () |
Will be emitted whenever the focused application changes. | |
Public Member Functions | |
virtual Q_INVOKABLE unity::shell::application::ApplicationInfoInterface * | get (int index) const =0 |
Get an ApplicationInfo item (using stack index). More... | |
virtual Q_INVOKABLE unity::shell::application::ApplicationInfoInterface * | findApplication (const QString &appId) const =0 |
Get an ApplicationInfo item (using the appId). More... | |
virtual Q_INVOKABLE bool | focusApplication (const QString &appId)=0 |
Focus the given application. More... | |
virtual Q_INVOKABLE void | unfocusCurrentApplication ()=0 |
Unfocus the currently focused application. | |
virtual Q_INVOKABLE unity::shell::application::ApplicationInfoInterface * | startApplication (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... | |
The Application manager.
This is the main class to interact with Applications
The Roles supported by the model.
See ApplicationInfoInterface properties for details.
|
pure virtual |
Get an ApplicationInfo item (using the appId).
Note: QML requires the full namespace in the return value.
appId | the appId of the item to get |
|
pure virtual |
Focus the given application.
appId | The application to be focused. |
|
pure virtual |
Get an ApplicationInfo item (using stack index).
Note: QML requires the full namespace in the return value.
index | the index of the item to get |
|
pure virtual |
Start an application.
appId | The appId for the application to be spawned. |
arguments | Any arguments to be passed to the process. |
|
pure virtual |
Stops an application.
appId | The application to be stopped. |
|
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.
|
read |
The currently focused application.
Use focusApplication() and unfocusCurrentApplication() to modify this.