~cimi/unity8/card_touchdown

« back to all changes in this revision

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

  • Committer: Andrea Cimitan
  • Date: 2014-06-24 09:54:02 UTC
  • mfrom: (917.6.36 unity8)
  • Revision ID: andrea.cimitan@gmail.com-20140624095402-gaw0o3l8y9fmoqhz
[ 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)
[ Pawel Stolowski ]
* Extend the hack for click scope categories with the upcoming 'store'
  category: single-tap on results from the 'store' category should
  activate them, instead of requesting a preview. (LP: #1326292)
[ Albert Astals ]
* Drop the " Preview" suffix from Preview title As requested in
  https://bugs.launchpad.net/unity8/+bug/1316671 (LP: #1316671)
[ Michael Terry ]
* Revert split greeter for now.  We will bring it back as an option
  for Desktop, but use a big hammer revert right now to get Touch back
  in shape.
[ CI bot ]
* Fix build problems. Reviewed by: Michael Terry (LP: #1328850)
[ Michał Sawicz ]
* Make lockscreen buttons translatable.
[ Albert Astals ]
* Correctly mark these functions as overrides
* Remove connections to non existant signal
* Better test name
* Improvements for headerless categories LVPWH: No section name -> no
  header LVPWH: New hasSectionHeader context property for delegates
  GSV: Add topMargin if no hasSectionHeader (LP: #1326415)
* Make tryVerticalJournal, tryHorizontalJournal and tryOrganicGrid
  work again
[ Michael Zanetti ]
* Don't crash when we get an invalid app from ApplicationManager (LP:
  #1309162)
[ Andrea Cimitan ]
* Workaround for lp1324159 (LP: #1322233, #1324159)
[ CI bot ]
* Resync trunk
[ Florian Boucault ]
* Application startup: changed splash rectangle to be black instead of
  white and added a neat little animation. (LP: #1124265)

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