20 #ifndef UNITY_SHELL_APPLICATION_APPLICATIONMANAGERINTERFACE_H
21 #define UNITY_SHELL_APPLICATION_APPLICATIONMANAGERINTERFACE_H
23 #include <unity/SymbolExport.h>
25 #include <QtCore/QObject>
26 #include <QtCore/QAbstractListModel>
35 class ApplicationInfoInterface;
53 Q_PROPERTY(
int count READ count NOTIFY countChanged)
60 Q_PROPERTY(QString focusedApplicationId READ focusedApplicationId NOTIFY focusedApplicationIdChanged)
67 Q_PROPERTY(
bool suspended READ suspended WRITE setSuspended NOTIFY suspendedChanged)
73 m_roleNames.insert(RoleAppId,
"appId");
74 m_roleNames.insert(RoleName,
"name");
75 m_roleNames.insert(RoleComment,
"comment");
76 m_roleNames.insert(RoleIcon,
"icon");
77 m_roleNames.insert(RoleStage,
"stage");
78 m_roleNames.insert(RoleState,
"state");
79 m_roleNames.insert(RoleFocused,
"focused");
80 m_roleNames.insert(RoleScreenshot,
"screenshot");
82 connect(
this, SIGNAL(rowsInserted(QModelIndex,
int,
int)), SIGNAL(countChanged()));
83 connect(
this, SIGNAL(rowsRemoved(QModelIndex,
int,
int)), SIGNAL(countChanged()));
84 connect(
this, SIGNAL(modelReset()), SIGNAL(countChanged()));
85 connect(
this, SIGNAL(layoutChanged()), SIGNAL(countChanged()));
96 RoleAppId = Qt::UserRole,
109 virtual QHash<int, QByteArray> roleNames()
const
118 virtual QString focusedApplicationId()
const = 0;
120 virtual bool suspended()
const = 0;
121 virtual void setSuspended(
bool suspended) = 0;
152 Q_INVOKABLE
virtual bool requestFocusApplication(
const QString &appId) = 0;
164 Q_INVOKABLE
virtual bool focusApplication(
const QString &appId) = 0;
169 Q_INVOKABLE
virtual void unfocusCurrentApplication() = 0;
186 Q_INVOKABLE
virtual bool stopApplication(
const QString &appId) = 0;
198 Q_INVOKABLE
virtual bool updateScreenshot(
const QString &appId) = 0;
211 void focusRequested(
const QString &appId);
216 void focusedApplicationIdChanged();
221 void suspendedChanged();
228 void applicationAdded(
const QString &appId);
235 void applicationRemoved(
const QString &appId);
239 QHash<int, QByteArray> m_roleNames;
247 #endif // UNITY_SHELL_APPLICATIONMANAGER_APPLICATIONINFO_H
The Application manager.
Definition: ApplicationManagerInterface.h:43
Roles
The Roles supported by the model.
Definition: ApplicationManagerInterface.h:95
A class that holds information about applications.
Definition: ApplicationInfoInterface.h:42