source: calamares/trunk/fuentes/src/modules/locale/LocaleViewStep.h @ 7538

Last change on this file since 7538 was 7538, checked in by kbut, 13 months ago

sync with github

File size: 2.4 KB
Line 
1/* === This file is part of Calamares - <https://github.com/calamares> ===
2 *
3 *   Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
4 *
5 *   Calamares is free software: you can redistribute it and/or modify
6 *   it under the terms of the GNU General Public License as published by
7 *   the Free Software Foundation, either version 3 of the License, or
8 *   (at your option) any later version.
9 *
10 *   Calamares is distributed in the hope that it will be useful,
11 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
12 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 *   GNU General Public License for more details.
14 *
15 *   You should have received a copy of the GNU General Public License
16 *   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef LOCALEVIEWSTEP_H
20#define LOCALEVIEWSTEP_H
21
22#include <QObject>
23
24#include <utils/PluginFactory.h>
25#include <viewpages/ViewStep.h>
26
27#include <PluginDllMacro.h>
28
29#include <QFutureWatcher>
30
31class LocalePage;
32class WaitingWidget;
33
34class PLUGINDLLEXPORT LocaleViewStep : public Calamares::ViewStep
35{
36    Q_OBJECT
37
38public:
39    explicit LocaleViewStep( QObject* parent = nullptr );
40    virtual ~LocaleViewStep() override;
41
42    QString prettyName() const override;
43    QString prettyStatus() const override;
44
45    QWidget* widget() override;
46
47    void next() override;
48    void back() override;
49
50    bool isNextEnabled() const override;
51    bool isBackEnabled() const override;
52
53    bool isAtBeginning() const override;
54    bool isAtEnd() const override;
55
56    QList< Calamares::job_ptr > jobs() const override;
57
58    void onActivate() override;
59    void onLeave() override;
60
61    void setConfigurationMap( const QVariantMap& configurationMap ) override;
62
63private slots:
64    void setUpPage();
65
66private:
67    void fetchGeoIpTimezone();
68    QWidget* m_widget;
69    QFutureWatcher< void > m_initWatcher;
70    WaitingWidget* m_waitingWidget;
71
72    LocalePage* m_actualWidget;
73    bool m_nextEnabled;
74    QString m_prettyStatus;
75
76    QPair< QString, QString > m_startingTimezone;
77    QString m_localeGenPath;
78
79    QString m_geoipUrl;  // The URL, depening on style might be modified on lookup
80    QString m_geoipStyle;  // String selecting which kind of geoip data to expect
81    QString m_geoipSelector;  // String selecting data from the geoip lookup
82
83    QList< Calamares::job_ptr > m_jobs;
84};
85
86CALAMARES_PLUGIN_FACTORY_DECLARATION( LocaleViewStepFactory )
87
88#endif // LOCALEVIEWSTEP_H
Note: See TracBrowser for help on using the repository browser.