The Application manager.
More...
#include <unity/shell/application/ApplicationManagerInterface.h>
|
enum | Roles {
RoleAppId = Qt::UserRole,
RoleName,
RoleComment,
RoleIcon,
RoleStage,
RoleState,
RoleFocused
} |
| The Roles supported by the model. More...
|
|
The Application manager.
This is the main class to interact with Applications
void unity::shell::application::ApplicationManagerInterface::applicationAdded |
( |
const QString & |
appId | ) |
|
|
signal |
Will be emitted when an application was added to the model.
- Parameters
-
appId | The appId of the application that was added. |
void unity::shell::application::ApplicationManagerInterface::applicationRemoved |
( |
const QString & |
appId | ) |
|
|
signal |
Will be emitted when an application was removed from the model.
- Parameters
-
appId | The appId of the application that was removed. |
Get an ApplicationInfo item (using the appId).
Note: QML requires the full namespace in the return value.
- Parameters
-
appId | the appId of the item to get |
- Returns
- The item, or null if not found.
virtual Q_INVOKABLE bool unity::shell::application::ApplicationManagerInterface::focusApplication |
( |
const QString & |
appId | ) |
|
|
pure virtual |
Focus the given application.
This will immediately focus the given application. Usually you should not use this but instead call requestFocusApplication() in order to allow the shell to prepare for the upcoming animation or even block the focus request (e.g. focus stealing prevention)
- Parameters
-
appId | The application to be focused. |
- Returns
- True if appId found and application focused, else false.
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 an ApplicationInfo item (using stack index).
Note: QML requires the full namespace in the return value.
- Parameters
-
index | the index of the item to get |
- Returns
- The item, or null if not found.
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
-
appId | The 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)
Start an application.
- Parameters
-
appId | The appId for the application to be spawned. |
arguments | Any arguments to be passed to the process. |
- Returns
- The created application item if start successful, else null.
virtual Q_INVOKABLE bool unity::shell::application::ApplicationManagerInterface::stopApplication |
( |
const QString & |
appId | ) |
|
|
pure virtual |
Stops an application.
- Parameters
-
appId | The application to be stopped. |
- Returns
- True if application stop successful, else false (i.e. false if application was not running).
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.
QString unity::shell::application::ApplicationManagerInterface::focusedApplicationId |
|
read |
The documentation for this class was generated from the following file: