~aacid/unity8/dash_overview

« back to all changes in this revision

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

  • Committer: Albert Astals
  • Date: 2014-08-07 15:27:32 UTC
  • mfrom: (1155.1.29 do_merged)
  • Revision ID: albert.astals@canonical.com-20140807152732-0zf22298f1lsxrz8
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
15
 */
16
16
 
17
 
#ifndef FAKE_DEPARTMENT_H
18
 
#define FAKE_DEPARTMENT_H
 
17
#ifndef FAKE_NAVIGATION_H
 
18
#define FAKE_NAVIGATION_H
19
19
 
20
 
#include <unity/shell/scopes/DepartmentInterface.h>
 
20
#include <unity/shell/scopes/NavigationInterface.h>
21
21
 
22
22
class Scope;
23
23
 
24
 
class Department : public unity::shell::scopes::DepartmentInterface
 
24
class Navigation : public unity::shell::scopes::NavigationInterface
25
25
{
26
26
    Q_OBJECT
27
27
 
28
28
public:
29
 
    Department(const QString& departmentId, const QString& label, const QString& allLabel, const QString& parentId, const QString& parentLabel, Scope* scope);
 
29
    Navigation(const QString& navigationId, const QString& label, const QString& allLabel, const QString& parentId, const QString& parentLabel, Scope* scope);
30
30
 
31
 
    QString departmentId() const override;
 
31
    QString navigationId() const override;
32
32
    QString label() const override;
33
33
    QString allLabel() const override;
34
 
    QString parentDepartmentId() const override;
 
34
    QString parentNavigationId() const override;
35
35
    QString parentLabel() const override;
36
36
    bool loaded() const override;
 
37
    bool isRoot() const override;
 
38
    bool hidden() const override;
37
39
    int count() const override;
38
 
    bool isRoot() const override;
39
40
 
40
41
    int rowCount(const QModelIndex &parent = QModelIndex()) const override;
41
 
    QHash<int, QByteArray> roleNames() const;
42
42
    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
43
43
 
44
44
public Q_SLOTS:
45
 
    void slotCurrentDepartmentChanged();
 
45
    void slotCurrentNavigationChanged();
46
46
 
47
47
private Q_SLOTS:
48
48
    void slotLoaded();
49
49
 
50
50
private:
51
 
    QString m_departmentId;
 
51
    QString m_navigationId;
52
52
    QString m_label;
53
53
    QString m_allLabel;
54
54
    QString m_parentId;
55
55
    QString m_parentLabel;
56
56
    bool m_loaded;
57
 
    QString m_currentDepartment;
 
57
    QString m_currentNavigation;
58
58
    Scope *m_scope;
59
59
};
60
60
 
61
 
#endif // FAKE_DEPARTMENT_H
 
61
#endif // FAKE_NAVIGATION_H