2020-08-25 16:05:56 +02:00
|
|
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
2014-07-17 09:49:15 +02:00
|
|
|
*
|
2020-08-22 01:19:58 +02:00
|
|
|
* 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-07-17 09:49:15 +02:00
|
|
|
*
|
2020-08-25 16:05:56 +02:00
|
|
|
* Calamares is Free Software: see the License-Identifier above.
|
2014-07-17 09:49:15 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef EDITEXISTINGPARTITIONDIALOG_H
|
|
|
|
#define EDITEXISTINGPARTITIONDIALOG_H
|
|
|
|
|
2016-03-04 19:13:49 +01:00
|
|
|
#include <kpmcore/core/partitiontable.h>
|
|
|
|
|
2014-07-17 09:49:15 +02:00
|
|
|
#include <QDialog>
|
|
|
|
#include <QScopedPointer>
|
|
|
|
|
|
|
|
class PartitionCoreModule;
|
|
|
|
class Device;
|
|
|
|
class Partition;
|
2014-08-06 18:31:46 +02:00
|
|
|
class PartitionSizeController;
|
2014-07-17 09:49:15 +02:00
|
|
|
class Ui_EditExistingPartitionDialog;
|
|
|
|
|
2014-08-08 11:46:43 +02:00
|
|
|
/**
|
|
|
|
* The dialog which is shown to edit a partition which already existed when the installer started.
|
|
|
|
*
|
|
|
|
* It lets you decide how to reuse the partition: whether to keep its content
|
|
|
|
* or reformat it, whether to resize or move it.
|
|
|
|
*/
|
2014-07-17 09:49:15 +02:00
|
|
|
class EditExistingPartitionDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2020-08-22 01:19:58 +02:00
|
|
|
EditExistingPartitionDialog( Device* device,
|
|
|
|
Partition* partition,
|
|
|
|
const QStringList& usedMountPoints,
|
|
|
|
QWidget* parentWidget = nullptr );
|
2020-10-23 22:23:10 +02:00
|
|
|
~EditExistingPartitionDialog() override;
|
2014-07-17 09:49:15 +02:00
|
|
|
|
|
|
|
void applyChanges( PartitionCoreModule* module );
|
|
|
|
|
2016-11-21 00:06:03 +01:00
|
|
|
private slots:
|
|
|
|
void checkMountPointSelection();
|
|
|
|
|
2014-07-17 09:49:15 +02:00
|
|
|
private:
|
|
|
|
QScopedPointer< Ui_EditExistingPartitionDialog > m_ui;
|
|
|
|
Device* m_device;
|
|
|
|
Partition* m_partition;
|
2014-08-06 18:31:46 +02:00
|
|
|
PartitionSizeController* m_partitionSizeController;
|
2016-11-21 00:06:03 +01:00
|
|
|
QStringList m_usedMountPoints;
|
2014-08-06 18:31:46 +02:00
|
|
|
|
2016-03-04 19:13:49 +01:00
|
|
|
PartitionTable::Flags newFlags() const;
|
2014-08-06 18:31:46 +02:00
|
|
|
void replacePartResizerWidget();
|
2015-07-15 13:25:52 +02:00
|
|
|
void updateMountPointPicker();
|
2014-07-17 09:49:15 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* EDITEXISTINGPARTITIONDIALOG_H */
|