20#ifndef LOMIRI_SHELL_LAUNCHER_LAUNCHERMODELINTERFACE_H
21#define LOMIRI_SHELL_LAUNCHER_LAUNCHERMODELINTERFACE_H
23#include <lomiri/SymbolExport.h>
25#include <lomiri/shell/application/ApplicationManagerInterface.h>
27#include <QtCore/QAbstractListModel>
36class LauncherItemInterface;
55 READ applicationManager WRITE setApplicationManager NOTIFY applicationManagerChanged)
60 Q_PROPERTY(
bool onlyPinned READ onlyPinned WRITE setOnlyPinned NOTIFY onlyPinnedChanged)
65 m_roleNames.insert(RoleAppId,
"appId");
66 m_roleNames.insert(RoleName,
"name");
67 m_roleNames.insert(RoleIcon,
"icon");
68 m_roleNames.insert(RolePinned,
"pinned");
69 m_roleNames.insert(RoleRunning,
"running");
70 m_roleNames.insert(RoleRecent,
"recent");
71 m_roleNames.insert(RoleProgress,
"progress");
72 m_roleNames.insert(RoleCount,
"count");
73 m_roleNames.insert(RoleCountVisible,
"countVisible");
74 m_roleNames.insert(RoleFocused,
"focused");
75 m_roleNames.insert(RoleAlerting,
"alerting");
76 m_roleNames.insert(RoleSurfaceCount,
"surfaceCount");
87 RoleAppId = Qt::UserRole,
109 Q_INVOKABLE
virtual void move(
int oldIndex,
int newIndex) = 0;
134 Q_INVOKABLE
virtual void pin(
const QString &appId,
int index = -1) = 0;
160 Q_INVOKABLE
virtual void setUser(
const QString &username) = 0;
166 virtual bool onlyPinned()
const = 0;
167 virtual void setOnlyPinned(
bool onlyPinned) = 0;
169 QHash<int, QByteArray> roleNames()
const override
177 void applicationManagerChanged();
178 void onlyPinnedChanged();
189 QHash<int, QByteArray> m_roleNames;
The Application manager.
Definition: ApplicationManagerInterface.h:45
An item presented in the launcher.
Definition: LauncherItemInterface.h:41
A list of launcher items to be displayed.
Definition: LauncherModelInterface.h:44
virtual Q_INVOKABLE lomiri::shell::launcher::LauncherItemInterface * get(int index) const =0
Get a launcher item.
Roles
The Roles supported by the model.
Definition: LauncherModelInterface.h:86
virtual Q_INVOKABLE void requestRemove(const QString &appId)=0
Request removal of an item from the model.
virtual Q_INVOKABLE void quickListActionInvoked(const QString &appId, int actionIndex)=0
Trigger an action from the QuickList.
void hint()
Emitted when the launcher should hint itself to the user, e.g. to indicate a change the user should b...
virtual Q_INVOKABLE void pin(const QString &appId, int index=-1)=0
Pin an item to the launcher.
virtual Q_INVOKABLE void move(int oldIndex, int newIndex)=0
Move an item in the model.
virtual Q_INVOKABLE void setUser(const QString &username)=0
Set the user for which the launcher should display items.
Top-level namespace for all things Lomiri-related.
Definition: Version.h:38