source: calamares/trunk/fuentes/src/modules/webview/WebViewStep.h @ 7538

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

sync with github

File size: 2.0 KB
Line 
1/* === This file is part of Calamares - <https://github.com/calamares> ===
2 *
3 *   Copyright 2015, Rohan Garg <rohan@garg.io>
4 *   Copyright 2016, Teo Mrnjavac <teo@kde.org>
5 *   Copyright 2017, Adriaan de Groot <groot@kde.org>
6 *
7 *   Calamares is free software: you can redistribute it and/or modify
8 *   it under the terms of the GNU General Public License as published by
9 *   the Free Software Foundation, either version 3 of the License, or
10 *   (at your option) any later version.
11 *
12 *   Calamares is distributed in the hope that it will be useful,
13 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 *   GNU General Public License for more details.
16 *
17 *   You should have received a copy of the GNU General Public License
18 *   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef WEBVIEWPLUGIN_H
22#define WEBVIEWPLUGIN_H
23
24#include "WebViewConfig.h"
25
26#include <utils/PluginFactory.h>
27#include <viewpages/ViewStep.h>
28
29#include <PluginDllMacro.h>
30
31#include <QVariantMap>
32
33#ifdef WEBVIEW_WITH_WEBKIT
34#define C_QWEBVIEW QWebView
35#else
36#define C_QWEBVIEW QWebEngineView
37#endif
38
39class C_QWEBVIEW;
40
41class PLUGINDLLEXPORT WebViewStep : public Calamares::ViewStep
42{
43    Q_OBJECT
44
45public:
46    explicit WebViewStep( QObject* parent = nullptr );
47    virtual ~WebViewStep() override;
48
49    QString prettyName() const override;
50
51    QWidget* widget() override;
52
53    void next() override;
54    void back() override;
55    void onActivate() override;
56
57    bool isNextEnabled() const override;
58    bool isBackEnabled() const override;
59
60    bool isAtBeginning() const override;
61    bool isAtEnd() const override;
62
63    QList< Calamares::job_ptr > jobs() const override;
64
65    void setConfigurationMap( const QVariantMap& configurationMap ) override;
66
67private:
68    C_QWEBVIEW *m_view;
69    QString m_url;
70    QString m_prettyName;
71};
72
73CALAMARES_PLUGIN_FACTORY_DECLARATION( WebViewStepFactory )
74
75#endif // WEBVIEWPLUGIN_H
Note: See TracBrowser for help on using the repository browser.