17 #ifndef LOMIRI_SHELL_APPLICATION_MIRSURFACELISTINTERFACE_H
18 #define LOMIRI_SHELL_APPLICATION_MIRSURFACELISTINTERFACE_H
20 #include <QAbstractListModel>
24 namespace application {
26 class MirSurfaceInterface;
57 SurfaceRole = Qt::UserRole,
62 virtual ~MirSurfaceListInterface() {}
69 Q_INVOKABLE
virtual MirSurfaceInterface *
get(
int index) = 0;
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
lomiri::shell::application::MirSurfaceInterface first
The first (index 0) surface in this model.
Definition: MirSurfaceListInterface.h:49
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:31
Roles
The Roles supported by the model.
Definition: MirSurfaceListInterface.h:56
Top-level namespace for all things Lomiri-related.
Definition: Version.h:37
Holds a Mir surface. Pretty much an opaque class.
Definition: MirSurfaceInterface.h:41