17 #ifndef LOMIRI_SHELL_APPLICATION_MIRSURFACELISTINTERFACE_H
18 #define LOMIRI_SHELL_APPLICATION_MIRSURFACELISTINTERFACE_H
20 #include <QAbstractListModel>
24 namespace application {
41 Q_PROPERTY(
int count READ
count NOTIFY countChanged)
57 SurfaceRole = Qt::UserRole,
62 virtual ~MirSurfaceListInterface() {}
73 QHash<int, QByteArray> roleNames()
const override {
74 QHash<int, QByteArray> roleNames;
75 roleNames.insert(SurfaceRole,
"surface");
79 int count()
const {
return rowCount(); }
81 MirSurfaceInterface *
first() {
92 void countChanged(
int count);
103 #endif // LOMIRI_SHELL_APPLICATION_MIRSURFACELISTINTERFACE_H
int count
Number of surfaces in this model.
Definition: MirSurfaceListInterface.h:41
virtual Q_INVOKABLE MirSurfaceInterface * get(int index)=0
Returns the surface at the specified index.
Interface for a list model of MirSurfaces.
Definition: MirSurfaceListInterface.h:32
Roles
The Roles supported by the model.
Definition: MirSurfaceListInterface.h:56
Top-level namespace for all things Lomiri-related.
Definition: Version.h:38
Holds a Mir surface. Pretty much an opaque class.
Definition: MirSurfaceInterface.h:42
lomiri::shell::application::MirSurfaceInterface * first
The first (index 0) surface in this model.
Definition: MirSurfaceListInterface.h:49