2 * Copyright (C) 2014-2016 Canonical, Ltd.
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.
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.
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/>.
17#ifndef MOCK_SYSTEMIMAGE_H
18#define MOCK_SYSTEMIMAGE_H
22class MockSystemImage : public QObject
25 Q_DISABLE_COPY(MockSystemImage)
27 Q_PROPERTY(bool updateDownloaded READ updateDownloaded CONSTANT)
28 Q_PROPERTY(QString availableVersion READ availableVersion CONSTANT)
29 Q_PROPERTY(QString updateSize READ updateSize CONSTANT)
30 Q_PROPERTY(bool updateApplying READ updateApplying NOTIFY updateApplyingChanged)
33 explicit MockSystemImage(QObject *parent = nullptr);
35 Q_INVOKABLE void checkForUpdate();
36 Q_INVOKABLE void applyUpdate();
37 Q_INVOKABLE void factoryReset();
39 bool updateApplying() const { return m_updateApplying; }
40 // these are const only in mock
41 bool updateDownloaded() const { return true; }
42 QString availableVersion() const { return QStringLiteral("42"); }
43 QString updateSize() const { return QStringLiteral("4.2 MB"); }
46 void resettingDevice(); // only for mock
47 void updateApplyingChanged();
50 void setUpdateApplying(bool status);
53 bool m_updateApplying = false;
56#endif // MOCK_SYSTEMIMAGE_H
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list