17 #ifndef UNITY_SHELL_SCOPES_SCOPESINTERFACE_H
18 #define UNITY_SHELL_SCOPES_SCOPESINTERFACE_H
20 #include <unity/SymbolExport.h>
22 #include <QAbstractListModel>
47 Q_PROPERTY(
bool loaded READ loaded NOTIFY loadedChanged)
52 Q_PROPERTY(
int count READ count NOTIFY countChanged)
59 Q_PROPERTY(
unity::shell::scopes::
ScopeInterface* overviewScope READ overviewScope NOTIFY overviewScopeChanged)
63 explicit
ScopesInterface(QObject* parent = 0) : QAbstractListModel(parent) { }
94 Q_INVOKABLE
virtual void setFavorite(QString
const& scopeId,
bool favorite) = 0;
99 Q_INVOKABLE
virtual void moveFavoriteTo(QString
const& scopeId,
int index) = 0;
102 virtual bool loaded()
const = 0;
103 virtual int count()
const = 0;
105 QHash<int, QByteArray> roleNames()
const override
107 QHash<int, QByteArray> roles;
108 roles[RoleScope] =
"scope";
109 roles[RoleId] =
"id";
110 roles[RoleTitle] =
"title";
119 void loadedChanged();
121 void overviewScopeChanged();
A list of scopes to display in the UI.
Definition: ScopesInterface.h:38
Top-level namespace for all things Unity-related.
Definition: Version.h:37
Object representing scope instance, which exposes model(s) with results.
Definition: ScopeInterface.h:40
Roles
Roles supported by the model.
Definition: ScopesInterface.h:70