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)
74 Q_PROPERTY(
bool forceDashActive READ forceDashActive WRITE setForceDashActive NOTIFY forceDashActiveChanged)
80 m_roleNames.insert(RoleAppId,
"appId");
81 m_roleNames.insert(RoleName,
"name");
82 m_roleNames.insert(RoleComment,
"comment");
83 m_roleNames.insert(RoleIcon,
"icon");
84 m_roleNames.insert(RoleStage,
"stage");
85 m_roleNames.insert(RoleState,
"state");
86 m_roleNames.insert(RoleFocused,
"focused");
88 connect(
this, SIGNAL(rowsInserted(QModelIndex,
int,
int)), SIGNAL(countChanged()));
89 connect(
this, SIGNAL(rowsRemoved(QModelIndex,
int,
int)), SIGNAL(countChanged()));
90 connect(
this, SIGNAL(modelReset()), SIGNAL(countChanged()));
91 connect(
this, SIGNAL(layoutChanged()), SIGNAL(countChanged()));
102 RoleAppId = Qt::UserRole,
114 virtual QHash<int, QByteArray> roleNames()
const
123 virtual QString focusedApplicationId()
const = 0;
125 virtual bool suspended()
const = 0;
126 virtual void setSuspended(
bool suspended) = 0;
128 virtual bool forceDashActive()
const = 0;
129 virtual void setForceDashActive(
bool forceDashActive) = 0;
160 Q_INVOKABLE
virtual bool requestFocusApplication(
const QString &appId) = 0;
172 Q_INVOKABLE
virtual bool focusApplication(
const QString &appId) = 0;
177 Q_INVOKABLE
virtual void unfocusCurrentApplication() = 0;
194 Q_INVOKABLE
virtual bool stopApplication(
const QString &appId) = 0;
207 void focusRequested(
const QString &appId);
212 void focusedApplicationIdChanged();
217 void suspendedChanged();
222 void forceDashActiveChanged();
229 void applicationAdded(
const QString &appId);
236 void applicationRemoved(
const QString &appId);
240 QHash<int, QByteArray> m_roleNames;
248 #endif // UNITY_SHELL_APPLICATIONMANAGER_APPLICATIONINFO_H
The Application manager.
Definition: ApplicationManagerInterface.h:43
Roles
The Roles supported by the model.
Definition: ApplicationManagerInterface.h:101
Top-level namespace for all things Unity-related.
Definition: Version.h:37
A class that holds information about applications.
Definition: ApplicationInfoInterface.h:44