~mzanetti/unity8/fix-left-edge-on-spread

« back to all changes in this revision

Viewing changes to tests/mocks/Unity/fake_scopes.h

  • Committer: Michael Zanetti
  • Date: 2015-01-12 11:21:17 UTC
  • mfrom: (1459.1.85 unity8)
  • Revision ID: michael.zanetti@canonical.com-20150112112117-0x9srs9dx0ndp60g
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include <QList>
29
29
#include <QTimer>
30
30
 
 
31
class ScopesOverview;
 
32
 
31
33
class Scopes : public unity::shell::scopes::ScopesInterface
32
34
{
33
35
    Q_OBJECT
44
46
    Q_INVOKABLE void addScope(Scope* scope);
45
47
 
46
48
    Q_INVOKABLE void clear();
 
49
    Q_INVOKABLE void clearFavorites();
47
50
    Q_INVOKABLE void load();
48
51
 
49
52
    QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
53
56
    int count() const override;
54
57
    unity::shell::scopes::ScopeInterface* overviewScope() const override;
55
58
 
 
59
    Q_INVOKABLE void setFavorite(const QString& scopeId, bool favorite) override;
 
60
    Q_INVOKABLE void moveFavoriteTo(const QString& scopeId, int index) override;
 
61
 
56
62
    // This is used as part of implementation of the other C++ code, not API
57
 
    QList<Scope*> scopes() const;
58
 
    QList<Scope*> allScopes() const;
 
63
    QList<Scope*> favScopes() const;
 
64
    QList<Scope*> nonFavScopes() const;
59
65
    Q_INVOKABLE Scope* getScopeFromAll(const QString& scope_id) const;
60
66
 
61
67
private Q_SLOTS:
64
70
private:
65
71
    QList<Scope*> m_scopes; // the favorite ones
66
72
    QList<Scope*> m_allScopes;
67
 
    Scope *m_scopesOverview;
 
73
    ScopesOverview *m_scopesOverview;
68
74
    bool m_loaded;
69
75
    QTimer timer;
70
76
};