A list of launcher items to be displayed.
More...
#include <unity/shell/launcher/LauncherModelInterface.h>
|
enum | Roles {
RoleAppId = Qt::UserRole,
RoleName,
RoleIcon,
RolePinned,
RoleRunning,
RoleRecent,
RoleProgress,
RoleCount,
RoleCountVisible,
RoleFocused,
RoleAlerting
} |
| The Roles supported by the model. More...
|
|
|
void | hint () |
| Emitted when the launcher should hint itself to the user, e.g. to indicate a change the user should be made aware of.
|
|
|
virtual Q_INVOKABLE void | setAlerting (const QString &appId, bool alerting)=0 |
| Set or unset alert-state on launcher item. More...
|
|
virtual Q_INVOKABLE void | move (int oldIndex, int newIndex)=0 |
| Move an item in the model. More...
|
|
virtual Q_INVOKABLE unity::shell::launcher::LauncherItemInterface * | get (int index) const =0 |
| Get a launcher item. More...
|
|
virtual Q_INVOKABLE void | pin (const QString &appId, int index=-1)=0 |
| Pin an item to the launcher. More...
|
|
virtual Q_INVOKABLE void | requestRemove (const QString &appId)=0 |
| Request removal of an item from the model. More...
|
|
virtual Q_INVOKABLE void | quickListActionInvoked (const QString &appId, int actionIndex)=0 |
| Trigger an action from the QuickList. More...
|
|
virtual Q_INVOKABLE void | setUser (const QString &username)=0 |
| Set the user for which the launcher should display items. More...
|
|
A list of launcher items to be displayed.
This model exposes all the launcher items that should be shown in the launcher.
Get a launcher item.
Note: QML requires the full namespace in the return value.
- Parameters
-
index | the index of the item to get |
- Returns
- The item.
virtual Q_INVOKABLE void unity::shell::launcher::LauncherModelInterface::move |
( |
int |
oldIndex, |
|
|
int |
newIndex |
|
) |
| |
|
pure virtual |
Move an item in the model.
- Parameters
-
oldIndex | The current (old) index of the item to be moved. |
newIndex | The new index where the item should be moved to. |
virtual Q_INVOKABLE void unity::shell::launcher::LauncherModelInterface::pin |
( |
const QString & |
appId, |
|
|
int |
index = -1 |
|
) |
| |
|
pure virtual |
Pin an item to the launcher.
Recent and running applications will eventually disappear from the model as the application is closed or new recent items appear. Pinning an item to the launcher makes it persist until remove is called on it.
- Parameters
-
appId | The appId of the item to be pinned. |
index | The index where the item should be pinned to. This parameter is optional and if not supplied, the item will be pinned to the current position. Note: If an item is not contained in the launcher yet, calling this without an index will pin the item to the end of the list. |
virtual Q_INVOKABLE void unity::shell::launcher::LauncherModelInterface::quickListActionInvoked |
( |
const QString & |
appId, |
|
|
int |
actionIndex |
|
) |
| |
|
pure virtual |
Trigger an action from the QuickList.
- Parameters
-
appId | The appId of the LauncherItem. |
actionIndex | The index of the triggered entry in the QuickListModel. |
virtual Q_INVOKABLE void unity::shell::launcher::LauncherModelInterface::requestRemove |
( |
const QString & |
appId | ) |
|
|
pure virtual |
Request removal of an item from the model.
Note: The actual removal of the item might be delayed in certain circumstances.
- Parameters
-
appId | The appId of the item to be removed. |
virtual Q_INVOKABLE void unity::shell::launcher::LauncherModelInterface::setAlerting |
( |
const QString & |
appId, |
|
|
bool |
alerting |
|
) |
| |
|
pure virtual |
Set or unset alert-state on launcher item.
- Parameters
-
appId | The appId of the item to affect. |
alerting | The flag to set/unset launcher item's alert state. |
virtual Q_INVOKABLE void unity::shell::launcher::LauncherModelInterface::setUser |
( |
const QString & |
username | ) |
|
|
pure virtual |
Set the user for which the launcher should display items.
- Parameters
-
username | The user for which the launcher should display items. |
The ApplicationManager instance the launcher should be connected to.
The Launcher will display applications contained in the ApplicationManager as running/recent apps and adjust the currently focused app highlight according to this.
The documentation for this class was generated from the following file: