~gerboland/unity-api/remove-focus-statetracking

« back to all changes in this revision

Viewing changes to include/unity/shell/scopes/ScopesInterface.h

  • Committer: CI bot
  • Author(s): Michal Hruby
  • Date: 2014-07-31 11:13:51 UTC
  • mfrom: (147.2.6 unity-api)
  • Revision ID: ps-jenkins@lists.canonical.com-20140731111351-d0r7g3xye11drt64
Added interface for scopes overview. 
Approved by: Albert Astals Cid

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
     */
47
47
    Q_PROPERTY(bool loaded READ loaded NOTIFY loadedChanged)
48
48
 
 
49
    /**
 
50
     * @brief Scope instance representing the overview scope.
 
51
     *
 
52
     * Scope instance representing the overview scope, note that it might be null while scopes are not loaded.
 
53
     */
 
54
    Q_PROPERTY(unity::shell::scopes::ScopeInterface* overviewScope READ overviewScope NOTIFY overviewScopeChanged)
 
55
 
49
56
protected:
50
57
    /// @cond
51
58
    explicit ScopesInterface(QObject* parent = 0) : QAbstractListModel(parent) { }
65
72
    /**
66
73
     * @brief Get ScopeInterface instance associated with a row.
67
74
     *
68
 
     * Returns ScopeInterface instance associated with a row or a null variant when
 
75
     * Returns ScopeInterface instance associated with a row or null when
69
76
     * supplied with incorrect index.
70
77
     */
71
78
    Q_INVOKABLE virtual unity::shell::scopes::ScopeInterface* getScope(int row) const = 0;
73
80
    /**
74
81
     * @brief Get ScopeInterface instance by scope id.
75
82
     *
76
 
     * Returns ScopeInterface instance which with the supplied scope id or a null
77
 
     * variant.
 
83
     * Returns ScopeInterface instance which with the supplied scope id or null.
78
84
     */
79
85
    Q_INVOKABLE virtual unity::shell::scopes::ScopeInterface* getScope(QString const& scopeId) const = 0;
80
86
 
81
87
    // @cond
82
88
    virtual bool loaded() const = 0;
 
89
    virtual unity::shell::scopes::ScopeInterface* overviewScope() const = 0;
83
90
    QHash<int, QByteArray> roleNames() const override
84
91
    {
85
92
        QHash<int, QByteArray> roles;
94
101
Q_SIGNALS:
95
102
    // @cond
96
103
    void loadedChanged();
 
104
    void overviewScopeChanged();
97
105
    // @endcond
98
106
};
99
107