calamares/src/modules/partition/gui/ReplaceWidget.h

62 lines
1.4 KiB
C
Raw Normal View History

/* === 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
*
* Calamares is Free Software: see the License-Identifier above.
2014-12-16 16:24:05 +01:00
*
*/
#ifndef REPLACEWIDGET_H
#define REPLACEWIDGET_H
2014-12-16 16:24:05 +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
class Ui_ReplaceWidget;
class QComboBox;
2014-12-16 16:24:05 +01:00
class PartitionCoreModule;
class Partition;
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 );
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:
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;
bool m_isEfi;
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