~ci-train-bot/ubuntu-system-settings/ubuntu-system-settings-ubuntu-yakkety-landing-027

« back to all changes in this revision

Viewing changes to tests/mocks/Ubuntu/DownloadManager/MockMetadata.h

  • Committer: Bileto Bot
  • Author(s): jonas-drange
  • Date: 2016-08-17 11:18:05 UTC
  • mfrom: (1631.6.245 updates-rewrite)
  • Revision ID: ci-train-bot@canonical.com-20160817111805-moyvik9wloy79ul3
rewrite the system update panel

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of system-settings
 
3
 *
 
4
 * Copyright (C) 2016 Canonical Ltd.
 
5
 *
 
6
 * This program is free software: you can redistribute it and/or modify it
 
7
 * under the terms of the GNU General Public License version 3, as published
 
8
 * by the Free Software Foundation.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful, but
 
11
 * WITHOUT ANY WARRANTY; without even the implied warranties of
 
12
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
13
 * PURPOSE.  See the GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License along
 
16
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
 */
 
18
 
 
19
#ifndef MOCK_METADATA_H
 
20
#define MOCK_METADATA_H
 
21
 
 
22
#include <QObject>
 
23
#include <QVariant>
 
24
#include <QVariantMap>
 
25
#include <QString>
 
26
 
 
27
class MockMetadata : public QObject {
 
28
    Q_OBJECT
 
29
    Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
 
30
    Q_PROPERTY(bool showInIndicator READ showInIndicator WRITE setShowInIndicator NOTIFY showIndicatorChanged)
 
31
    Q_PROPERTY(QStringList command READ command WRITE setCommand NOTIFY commandChanged)
 
32
    Q_PROPERTY(QVariantMap custom READ custom WRITE setCustom NOTIFY customChanged)
 
33
 
 
34
public:
 
35
    explicit MockMetadata(QObject* parent=0);
 
36
 
 
37
    QString title() const;
 
38
    void setTitle(QString title);
 
39
 
 
40
    bool showInIndicator() const;
 
41
    void setShowInIndicator(bool shown);
 
42
 
 
43
    QVariantMap map() const;
 
44
 
 
45
    QStringList command() const;
 
46
    void setCommand(const QStringList &command);
 
47
 
 
48
    QVariantMap custom() const;
 
49
    void setCustom(const QVariantMap &custom);
 
50
 
 
51
 
 
52
signals:
 
53
    void titleChanged();
 
54
    void showIndicatorChanged();
 
55
    void commandChanged();
 
56
    void customChanged();
 
57
 
 
58
private:
 
59
    QVariantMap m_map;
 
60
    QVariantMap m_custom;
 
61
 
 
62
};
 
63
 
 
64
#endif // MOCK_METADATA_H