~cimi/unity8/card_emblems_single_container

« back to all changes in this revision

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

  • Committer: Andrea Cimitan
  • Date: 2014-06-26 12:06:37 UTC
  • mfrom: (931.1.54 unity8)
  • Revision ID: andrea.cimitan@gmail.com-20140626120637-wyy0lxrw4akwik92
[ Ying-Chun Liu ]
* Add logout support. Reviewed by: Daniel d'Andrada (LP: #1302213)
[ Michał Sawicz ]
* Make so that fixedArtShapeSize actually fixes artShapeSize.
[ Albert Astals ]
* Add VerticalJournal integration to Dash/scopes/QML (LP: #1326467)
* Make so that fixedArtShapeSize actually fixes artShapeSize.
[ Mirco Müller ]
* Added the frontend-part of sound-hint support for notifications with
  updated QML-tests.
* New rebuild forced
[ Albert Astals ]
* Departments support (LP: #1320847)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2014 Canonical, Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
#ifndef FAKE_DEPARTMENT_H
 
18
#define FAKE_DEPARTMENT_H
 
19
 
 
20
#include <unity/shell/scopes/DepartmentInterface.h>
 
21
 
 
22
class Scope;
 
23
 
 
24
class Department : public unity::shell::scopes::DepartmentInterface
 
25
{
 
26
    Q_OBJECT
 
27
 
 
28
public:
 
29
    Department(const QString& departmentId, const QString& label, const QString& allLabel, const QString& parentId, const QString& parentLabel, Scope* scope);
 
30
 
 
31
    QString departmentId() const override;
 
32
    QString label() const override;
 
33
    QString allLabel() const override;
 
34
    QString parentDepartmentId() const override;
 
35
    QString parentLabel() const override;
 
36
    bool loaded() const override;
 
37
    int count() const override;
 
38
    bool isRoot() const override;
 
39
 
 
40
    int rowCount(const QModelIndex &parent = QModelIndex()) const override;
 
41
    QHash<int, QByteArray> roleNames() const;
 
42
    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
 
43
 
 
44
public Q_SLOTS:
 
45
    void slotCurrentDepartmentChanged();
 
46
 
 
47
private Q_SLOTS:
 
48
    void slotLoaded();
 
49
 
 
50
private:
 
51
    QString m_departmentId;
 
52
    QString m_label;
 
53
    QString m_allLabel;
 
54
    QString m_parentId;
 
55
    QString m_parentLabel;
 
56
    bool m_loaded;
 
57
    QString m_currentDepartment;
 
58
    Scope *m_scope;
 
59
};
 
60
 
 
61
#endif // FAKE_DEPARTMENT_H