source: calamares/trunk/fuentes/src/modules/partition/gui/PartitionViewStep.h @ 7538

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

sync with github

File size: 2.3 KB
Line 
1/* === This file is part of Calamares - <https://github.com/calamares> ===
2 *
3 *   Copyright 2014, Aurélien Gâteau <agateau@kde.org>
4 *   Copyright 2014-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 PARTITIONVIEWSTEP_H
22#define PARTITIONVIEWSTEP_H
23
24#include <utils/PluginFactory.h>
25#include <viewpages/ViewStep.h>
26
27#include <PluginDllMacro.h>
28
29#include <QObject>
30
31class ChoicePage;
32class PartitionPage;
33class PartitionCoreModule;
34class QStackedWidget;
35
36/**
37 * The starting point of the module. Instantiates PartitionCoreModule,
38 * ChoicePage and PartitionPage, then connects them.
39 */
40class PLUGINDLLEXPORT PartitionViewStep : public Calamares::ViewStep
41{
42    Q_OBJECT
43
44public:
45    explicit PartitionViewStep( QObject* parent = nullptr );
46    virtual ~PartitionViewStep() override;
47
48    QString prettyName() const override;
49    QWidget* createSummaryWidget() const override;
50
51    QWidget* widget() override;
52
53    void next() override;
54    void back() override;
55
56    bool isNextEnabled() const override;
57    bool isBackEnabled() const override;
58
59    bool isAtBeginning() const override;
60    bool isAtEnd() const override;
61
62    void onActivate() override;
63    void onLeave() override;
64
65    void setConfigurationMap( const QVariantMap& configurationMap ) override;
66
67    QList< Calamares::job_ptr > jobs() const override;
68
69private:
70    void initPartitionCoreModule();
71    void continueLoading();
72
73    PartitionCoreModule* m_core;
74    QStackedWidget*   m_widget;
75    ChoicePage*       m_choicePage;
76    PartitionPage*    m_manualPartitionPage;
77
78    QWidget*          m_waitingWidget;
79};
80
81CALAMARES_PLUGIN_FACTORY_DECLARATION( PartitionViewStepFactory )
82
83#endif // PARTITIONVIEWSTEP_H
Note: See TracBrowser for help on using the repository browser.