20 #ifndef UNITY_SHELL_LAUNCHER_LAUNCHERMODELINTERFACE_H
21 #define UNITY_SHELL_LAUNCHER_LAUNCHERMODELINTERFACE_H
23 #include <unity/SymbolExport.h>
25 #include <unity/shell/application/ApplicationManagerInterface.h>
27 #include <QtCore/QAbstractListModel>
36 class 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;
143 Q_INVOKABLE
virtual void requestRemove(
const QString &appId) = 0;
152 Q_INVOKABLE
virtual void quickListActionInvoked(
const QString &appId,
int actionIndex) = 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;
198 #endif // UNITY_SHELL_LAUNCHER_LAUNCHERMODELINTERFACE_H