17#ifndef UNITY_SHELL_SCOPES_SCOPESINTERFACE_H
18#define UNITY_SHELL_SCOPES_SCOPESINTERFACE_H
20#include <unity/SymbolExport.h>
22#include <QAbstractListModel>
61 explicit
ScopesInterface(QObject* parent = 0) : QAbstractListModel(parent) { }
93 Q_INVOKABLE virtual
void setFavorite(QString const& scopeId,
bool favorite) = 0;
98 Q_INVOKABLE virtual
void moveFavoriteTo(QString const& scopeId,
int index) = 0;
101 virtual
bool loaded() const = 0;
102 virtual
int count() const = 0;
104 QHash<
int, QByteArray> roleNames()
const override
106 QHash<int, QByteArray> roles;
107 roles[RoleScope] =
"scope";
108 roles[RoleId] =
"id";
109 roles[RoleTitle] =
"title";
118 void loadedChanged();
120 void overviewScopeChanged();
Object representing scope instance, which exposes model(s) with results.
Definition ScopeInterface.h:43
A list of scopes to display in the UI.
Definition ScopesInterface.h:39
bool loaded
Boolean indicating whether asynchronous populating of the model finished.
Definition ScopesInterface.h:45
unity::shell::scopes::ScopeInterface * overviewScope
Scope instance representing the overview scope.
Definition ScopesInterface.h:57
Roles
Roles supported by the model.
Definition ScopesInterface.h:68
virtual Q_INVOKABLE void moveFavoriteTo(QString const &scopeId, int index)=0
Move the given favorite scope to the given index.
virtual Q_INVOKABLE void setFavorite(QString const &scopeId, bool favorite)=0
Set the favorite bit of the given scope.
virtual Q_INVOKABLE unity::shell::scopes::ScopeInterface * getScope(int row) const =0
Get ScopeInterface instance associated with a row.
int count
Interger specifying how many items are in the model.
Definition ScopesInterface.h:50
Top-level namespace for all things Unity-related.
Definition Version.h:38