2020-08-25 16:05:56 +02:00
|
|
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
2014-12-16 16:24:05 +01:00
|
|
|
*
|
2020-08-22 01:19:58 +02:00
|
|
|
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
|
|
|
|
* SPDX-FileCopyrightText: 2014 Aurélien Gâteau <agateau@kde.org>
|
|
|
|
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2014-12-16 16:24:05 +01:00
|
|
|
*
|
2020-08-25 16:05:56 +02:00
|
|
|
* Calamares is Free Software: see the License-Identifier above.
|
2014-12-16 16:24:05 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2015-11-20 14:48:47 +01:00
|
|
|
#ifndef REPLACEWIDGET_H
|
|
|
|
#define REPLACEWIDGET_H
|
2014-12-16 16:24:05 +01:00
|
|
|
|
2018-02-07 17:40:11 +01:00
|
|
|
#include "utils/CalamaresUtilsGui.h"
|
|
|
|
|
2014-12-16 16:24:05 +01:00
|
|
|
#include <QScopedPointer>
|
2020-08-22 01:19:58 +02:00
|
|
|
#include <QWidget>
|
2014-12-16 16:24:05 +01:00
|
|
|
|
2015-11-20 14:48:47 +01:00
|
|
|
class Ui_ReplaceWidget;
|
|
|
|
class QComboBox;
|
2014-12-16 16:24:05 +01:00
|
|
|
class PartitionCoreModule;
|
2015-05-22 18:16:03 +02:00
|
|
|
class Partition;
|
|
|
|
|
2015-11-20 14:48:47 +01:00
|
|
|
class ReplaceWidget : public QWidget
|
2014-12-16 16:24:05 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2020-08-22 01:19:58 +02:00
|
|
|
explicit ReplaceWidget( PartitionCoreModule* core, QComboBox* devicesComboBox, QWidget* parent = nullptr );
|
2020-10-23 22:23:10 +02:00
|
|
|
virtual ~ReplaceWidget() override;
|
2014-12-16 16:24:05 +01:00
|
|
|
|
|
|
|
bool isNextEnabled() const;
|
|
|
|
|
2015-04-29 18:15:46 +02:00
|
|
|
void reset();
|
|
|
|
|
2014-12-16 16:24:05 +01:00
|
|
|
void applyChanges();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void nextStatusChanged( bool );
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void onPartitionSelected();
|
|
|
|
|
|
|
|
private:
|
2015-11-20 14:48:47 +01:00
|
|
|
QScopedPointer< Ui_ReplaceWidget > m_ui;
|
2014-12-16 16:24:05 +01:00
|
|
|
void setNextEnabled( bool enabled );
|
|
|
|
|
|
|
|
void updateStatus( CalamaresUtils::ImageType imageType, const QString& text );
|
|
|
|
|
|
|
|
PartitionCoreModule* m_core;
|
|
|
|
|
|
|
|
bool m_nextEnabled;
|
|
|
|
|
2015-05-22 18:16:03 +02:00
|
|
|
bool m_isEfi;
|
|
|
|
|
2015-11-20 14:48:47 +01:00
|
|
|
void updateFromCurrentDevice( QComboBox* devicesComboBox );
|
2014-12-16 16:24:05 +01:00
|
|
|
void onPartitionViewActivated();
|
|
|
|
void onPartitionModelReset();
|
|
|
|
};
|
|
|
|
|
2020-08-22 01:19:58 +02:00
|
|
|
#endif // REPLACEWIDGET_H
|