diff options
Diffstat (limited to 'ui/qt5/partitionchoicepage.cc')
-rw-r--r-- | ui/qt5/partitionchoicepage.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/qt5/partitionchoicepage.cc b/ui/qt5/partitionchoicepage.cc index 3045b79..ce0a473 100644 --- a/ui/qt5/partitionchoicepage.cc +++ b/ui/qt5/partitionchoicepage.cc @@ -13,6 +13,7 @@ #include "partitionchoicepage.hh" #include <QLabel> +#include <QMessageBox> #include <QVBoxLayout> PartitionChoicePage::PartitionChoicePage(QWidget *parent) @@ -141,3 +142,15 @@ int PartitionChoicePage::nextId() const { return HorizonWizard::Page_Network; } } + +bool PartitionChoicePage::validatePage() { + if(buttons->checkedButton() == eraseButton) { + return (QMessageBox::critical(this, tr("Erase Disk"), + tr("You have chosen to ERASE %1. " + "All data on %1 will be permanently erased.\n\n" + "Do you wish to continue?").arg(QString::fromStdString(horizonWizard()->chosen_disk)), + QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes); + } + + return true; +} |