mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 02:15:36 -04:00
Show a summary of the partition changes on the summary page
This commit is contained in:
parent
e7e57689d8
commit
03c5a38b90
8 changed files with 141 additions and 22 deletions
|
@ -18,8 +18,15 @@
|
|||
|
||||
#include <PartitionViewStep.h>
|
||||
|
||||
#include <PartitionPage.h>
|
||||
#include <DeviceModel.h>
|
||||
#include <PartitionCoreModule.h>
|
||||
#include <PartitionModel.h>
|
||||
#include <PartitionPage.h>
|
||||
#include <PartitionPreview.h>
|
||||
|
||||
// Qt
|
||||
#include <QFormLayout>
|
||||
#include <QLabel>
|
||||
|
||||
PartitionViewStep::PartitionViewStep( QObject* parent )
|
||||
: Calamares::ViewStep( parent )
|
||||
|
@ -45,6 +52,33 @@ PartitionViewStep::widget()
|
|||
}
|
||||
|
||||
|
||||
QWidget*
|
||||
PartitionViewStep::createSummaryWidget() const
|
||||
{
|
||||
QWidget* widget = new QWidget;
|
||||
QFormLayout* layout = new QFormLayout( widget );
|
||||
layout->setMargin( 0 );
|
||||
|
||||
QList< PartitionCoreModule::SummaryInfo > list = m_core->createSummaryInfo();
|
||||
for ( const auto& info : list )
|
||||
{
|
||||
PartitionPreview* preview;
|
||||
|
||||
layout->addRow( new QLabel( info.deviceName ) );
|
||||
|
||||
preview = new PartitionPreview;
|
||||
preview->setModel( info.partitionModelBefore );
|
||||
info.partitionModelBefore->setParent( widget );
|
||||
layout->addRow( tr( "Before:" ), preview );
|
||||
|
||||
preview = new PartitionPreview;
|
||||
preview->setModel( info.partitionModelAfter );
|
||||
info.partitionModelAfter->setParent( widget );
|
||||
layout->addRow( tr( "After:" ), preview );
|
||||
}
|
||||
return widget;
|
||||
}
|
||||
|
||||
void
|
||||
PartitionViewStep::next()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue