20#ifndef LOMIRI_SHELL_APPLICATION_APPLICATIONMANAGERINTERFACE_H
21#define LOMIRI_SHELL_APPLICATION_APPLICATIONMANAGERINTERFACE_H
23#include <lomiri/SymbolExport.h>
25#include <QtCore/QObject>
26#include <QtCore/QAbstractListModel>
35class ApplicationInfoInterface;
36class MirSurfaceInterface;
53 Q_PROPERTY(
int count READ count NOTIFY countChanged)
60 Q_PROPERTY(QString focusedApplicationId READ focusedApplicationId NOTIFY focusedApplicationIdChanged)
66 m_roleNames.insert(RoleAppId,
"appId");
67 m_roleNames.insert(RoleName,
"name");
68 m_roleNames.insert(RoleComment,
"comment");
69 m_roleNames.insert(RoleIcon,
"icon");
70 m_roleNames.insert(RoleState,
"state");
71 m_roleNames.insert(RoleFocused,
"focused");
72 m_roleNames.insert(RoleIsTouchApp,
"isTouchApp");
73 m_roleNames.insert(RoleExemptFromLifecycle,
"exemptFromLifecycle");
74 m_roleNames.insert(RoleApplication,
"application");
76 connect(
this, SIGNAL(rowsInserted(QModelIndex,
int,
int)), SIGNAL(countChanged()));
77 connect(
this, SIGNAL(rowsRemoved(QModelIndex,
int,
int)), SIGNAL(countChanged()));
78 connect(
this, SIGNAL(modelReset()), SIGNAL(countChanged()));
79 connect(
this, SIGNAL(layoutChanged()), SIGNAL(countChanged()));
90 RoleAppId = Qt::UserRole,
97 RoleExemptFromLifecycle,
105 QHash<int, QByteArray> roleNames()
const override
114 virtual QString focusedApplicationId()
const = 0;
190 QHash<int, QByteArray> m_roleNames;
A class that holds information about applications.
Definition: ApplicationInfoInterface.h:44
The Application manager.
Definition: ApplicationManagerInterface.h:45
virtual Q_INVOKABLE bool requestFocusApplication(const QString &appId)=0
Request to focus a given application.
virtual Q_INVOKABLE lomiri::shell::application::ApplicationInfoInterface * findApplication(const QString &appId) const =0
Get an ApplicationInfo item (using the appId).
void focusedApplicationIdChanged()
Will be emitted whenever the focused application changes.
virtual Q_INVOKABLE bool stopApplication(const QString &appId)=0
Stops an application.
Roles
The Roles supported by the model.
Definition: ApplicationManagerInterface.h:89
void focusRequested(const QString &appId)
Will be emitted right before the focused application changes.
virtual Q_INVOKABLE lomiri::shell::application::ApplicationInfoInterface * startApplication(const QString &appId, const QStringList &arguments)=0
Start an application.
virtual Q_INVOKABLE lomiri::shell::application::ApplicationInfoInterface * get(int index) const =0
Get an ApplicationInfo item (using stack index).
Holds a Mir surface. Pretty much an opaque class.
Definition: MirSurfaceInterface.h:42
Top-level namespace for all things Lomiri-related.
Definition: Version.h:38