diff --git a/src/modules/partition/gui/AlongsidePage.cpp b/src/modules/partition/gui/AlongsidePage.cpp index ee8772fbb..7ecd3f80a 100644 --- a/src/modules/partition/gui/AlongsidePage.cpp +++ b/src/modules/partition/gui/AlongsidePage.cpp @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +27,7 @@ #include "core/PartitionInfo.h" #include "core/PartitionIterator.h" #include "gui/PartitionSplitterWidget.h" +#include "gui/PartitionPreview.h" #include "JobQueue.h" #include "GlobalStorage.h" @@ -60,6 +61,10 @@ AlongsidePage::AlongsidePage( QWidget* parent ) partitionsComboLayout->addStretch(); + m_previewWidget = new PartitionPreview; + m_previewWidget->setLabelsVisible( true ); + mainLayout->addWidget( m_previewWidget ); + QLabel* allocateSpaceLabel = new QLabel(); mainLayout->addWidget( allocateSpaceLabel ); @@ -138,6 +143,14 @@ AlongsidePage::init( PartitionCoreModule* core , const OsproberEntryList& osprob } } + Device* deviceBefore = m_core->createImmutableDeviceCopy( dev ); + + PartitionModel* partitionModelBefore = new PartitionModel; + partitionModelBefore->init( deviceBefore ); + deviceBefore->setParent( partitionModelBefore ); + partitionModelBefore->setParent( m_previewWidget ); + + m_previewWidget->setModel( partitionModelBefore ); m_splitterWidget->init( allPartitionItems ); m_splitterWidget->setSplitPartition( candidate->partitionPath(), diff --git a/src/modules/partition/gui/AlongsidePage.h b/src/modules/partition/gui/AlongsidePage.h index e867aa49b..30bb94cc2 100644 --- a/src/modules/partition/gui/AlongsidePage.h +++ b/src/modules/partition/gui/AlongsidePage.h @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,6 +28,7 @@ class QLabel; class PartitionCoreModule; class PartitionSplitterWidget; class Partition; +class PartitionPreview; class Device; class AlongsidePage : public QWidget @@ -50,6 +51,7 @@ private: QComboBox* m_partitionsComboBox; PartitionSplitterWidget* m_splitterWidget; + PartitionPreview* m_previewWidget; QLabel* m_sizeLabel; PartitionCoreModule* m_core;