17#ifndef UNITY_SHELL_APPLICATION_MIRSURFACELISTINTERFACE_H
18#define UNITY_SHELL_APPLICATION_MIRSURFACELISTINTERFACE_H
20#include <QAbstractListModel>
24namespace application {
26class MirSurfaceInterface;
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);
Holds a Mir surface. Pretty much an opaque class.
Definition MirSurfaceInterface.h:42
Interface for a list model of MirSurfaces.
Definition MirSurfaceListInterface.h:32
Roles
The Roles supported by the model.
Definition MirSurfaceListInterface.h:56
int count
Number of surfaces in this model.
Definition MirSurfaceListInterface.h:41
unity::shell::application::MirSurfaceInterface * first
The first (index 0) surface in this model.
Definition MirSurfaceListInterface.h:49
virtual Q_INVOKABLE MirSurfaceInterface * get(int index)=0
Returns the surface at the specified index.
Top-level namespace for all things Unity-related.
Definition Version.h:38