2 * Copyright (C) 2014-2016 Canonical Ltd.
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published
6 * by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranties of
10 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program. If not, see <http://www.gnu.org/licenses/>.
17#ifndef WIZARD_SYSTEM_H
18#define WIZARD_SYSTEM_H
20#include <QFileSystemWatcher>
21#include <QVersionNumber>
25class System : public QObject
28 Q_PROPERTY(bool wizardEnabled READ wizardEnabled WRITE setWizardEnabled NOTIFY wizardEnabledChanged)
29 Q_PROPERTY(int versionToShow READ versionToShow)
36 * Checks whether the wizard is enabled for first-run or otherwise.
38 bool wizardEnabled() const;
41 * Returns the version of the wizard that should be run
42 * -1 denotes that no wizard should be run. 0 denotes that the first-run
43 * wizard should be run. If we determine that the first-run wizard has run
44 * but ::CURRENT_VERSION has not, we return ::CURRENT_VERSION.
45 * For example, if ::CURRENT_VERSION is 4, version 4 has not run, but the
46 * first-run wizard has run, this method will return 4
48 signed int versionToShow() const;
51 * The update version for the Wizard in this version of Unity8. Bump this
52 * version then set the showOnVersions property for the pages you would like
53 * to run on the current update to the new value.
55 int CURRENT_VERSION = 1;
57 void setWizardEnabled(bool enabled);
60 void updateSessionLocale(const QString &locale);
62 * Mark the wizard to skip all the pages and just show the last (welcome to ubuntu) page
64 void skipUntilFinishedPage();
67 void wizardEnabledChanged();
70 void watcherFileChanged();
73 Q_DISABLE_COPY(System)
75 static QString wizardEnabledPath();
76 static void setSessionVariable(const QString &variable, const QString &value);
78 QFileSystemWatcher m_fsWatcher;
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