2020-08-25 16:05:56 +02:00
|
|
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
2014-06-27 17:25:39 +02:00
|
|
|
*
|
2020-08-22 01:19:58 +02:00
|
|
|
* SPDX-FileCopyrightText: 2014 Aurélien Gâteau <agateau@kde.org>
|
|
|
|
* SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac <teo@kde.org>
|
|
|
|
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2014-06-27 17:25:39 +02:00
|
|
|
*
|
2020-08-25 16:05:56 +02:00
|
|
|
* Calamares is Free Software: see the License-Identifier above.
|
2014-06-27 17:25:39 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2014-06-30 13:24:59 +02:00
|
|
|
#ifndef PARTITIONVIEWSTEP_H
|
|
|
|
#define PARTITIONVIEWSTEP_H
|
2014-06-27 17:25:39 +02:00
|
|
|
|
2020-03-10 02:45:40 +01:00
|
|
|
#include "utils/PluginFactory.h"
|
|
|
|
#include "viewpages/ViewStep.h"
|
2015-09-09 18:52:08 +02:00
|
|
|
|
2020-03-10 02:45:40 +01:00
|
|
|
#include "DllMacro.h"
|
2015-09-09 18:52:08 +02:00
|
|
|
|
|
|
|
#include <QObject>
|
2018-12-04 11:35:35 +01:00
|
|
|
#include <QSet>
|
2015-09-09 18:52:08 +02:00
|
|
|
|
2014-09-03 18:09:37 +02:00
|
|
|
class ChoicePage;
|
2020-05-18 13:07:12 +02:00
|
|
|
class Config;
|
2014-06-27 18:14:39 +02:00
|
|
|
class PartitionPage;
|
2014-07-02 16:06:54 +02:00
|
|
|
class PartitionCoreModule;
|
2014-09-03 18:09:37 +02:00
|
|
|
class QStackedWidget;
|
2019-06-07 21:06:46 +02:00
|
|
|
class WaitingWidget;
|
2014-06-27 18:14:39 +02:00
|
|
|
|
2020-08-22 01:19:58 +02:00
|
|
|
template < typename T >
|
|
|
|
class QFutureWatcher;
|
2017-12-02 18:11:56 +01:00
|
|
|
|
2014-08-08 11:46:43 +02:00
|
|
|
/**
|
2017-03-03 12:32:35 +01:00
|
|
|
* The starting point of the module. Instantiates PartitionCoreModule,
|
|
|
|
* ChoicePage and PartitionPage, then connects them.
|
2014-08-08 11:46:43 +02:00
|
|
|
*/
|
2014-06-30 13:24:59 +02:00
|
|
|
class PLUGINDLLEXPORT PartitionViewStep : public Calamares::ViewStep
|
2014-06-27 17:25:39 +02:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-09-14 13:02:24 +02:00
|
|
|
explicit PartitionViewStep( QObject* parent = nullptr );
|
2020-09-22 22:49:30 +02:00
|
|
|
~PartitionViewStep() override;
|
2014-06-27 17:25:39 +02:00
|
|
|
|
2014-07-01 11:49:09 +02:00
|
|
|
QString prettyName() const override;
|
2021-07-06 18:59:58 +02:00
|
|
|
QString prettyStatus() const override;
|
2014-07-30 14:15:29 +02:00
|
|
|
QWidget* createSummaryWidget() const override;
|
2014-06-27 18:14:39 +02:00
|
|
|
|
|
|
|
QWidget* widget() override;
|
|
|
|
|
|
|
|
void next() override;
|
|
|
|
void back() override;
|
|
|
|
|
2014-07-01 11:49:09 +02:00
|
|
|
bool isNextEnabled() const override;
|
2015-01-29 20:24:09 +01:00
|
|
|
bool isBackEnabled() const override;
|
2014-06-27 18:14:39 +02:00
|
|
|
|
2014-07-01 11:49:09 +02:00
|
|
|
bool isAtBeginning() const override;
|
|
|
|
bool isAtEnd() const override;
|
2014-06-27 18:14:39 +02:00
|
|
|
|
2015-04-29 18:16:18 +02:00
|
|
|
void onActivate() override;
|
2014-10-06 18:30:23 +02:00
|
|
|
void onLeave() override;
|
|
|
|
|
2015-02-14 22:53:00 +01:00
|
|
|
void setConfigurationMap( const QVariantMap& configurationMap ) override;
|
|
|
|
|
2019-05-28 16:39:00 +02:00
|
|
|
Calamares::JobList jobs() const override;
|
2014-07-08 14:02:21 +02:00
|
|
|
|
2017-12-02 17:42:56 +01:00
|
|
|
Calamares::RequirementsList checkRequirements() override;
|
|
|
|
|
2014-06-27 18:14:39 +02:00
|
|
|
private:
|
2016-05-26 15:35:24 +02:00
|
|
|
void initPartitionCoreModule();
|
|
|
|
void continueLoading();
|
|
|
|
|
2020-07-29 14:13:43 +02:00
|
|
|
/// "slot" for changes to next-status from the KPMCore and ChoicePage
|
|
|
|
void nextPossiblyChanged( bool );
|
|
|
|
|
2020-05-18 13:07:12 +02:00
|
|
|
Config* m_config;
|
|
|
|
|
2014-07-02 16:06:54 +02:00
|
|
|
PartitionCoreModule* m_core;
|
2020-08-22 01:19:58 +02:00
|
|
|
QStackedWidget* m_widget;
|
|
|
|
ChoicePage* m_choicePage;
|
|
|
|
PartitionPage* m_manualPartitionPage;
|
2015-10-06 18:40:31 +02:00
|
|
|
|
2019-06-07 21:06:46 +02:00
|
|
|
WaitingWidget* m_waitingWidget;
|
2020-08-22 01:19:58 +02:00
|
|
|
QFutureWatcher< void >* m_future;
|
2014-06-27 17:25:39 +02:00
|
|
|
};
|
|
|
|
|
2015-09-09 18:52:08 +02:00
|
|
|
CALAMARES_PLUGIN_FACTORY_DECLARATION( PartitionViewStepFactory )
|
|
|
|
|
2020-08-22 01:19:58 +02:00
|
|
|
#endif // PARTITIONVIEWSTEP_H
|