Scaffolding for exiting partition reformating

This commit is contained in:
Aurélien Gâteau 2014-07-17 14:59:59 +02:00
parent 4e49f59333
commit d7a853ee06
4 changed files with 20 additions and 5 deletions

View file

@ -18,6 +18,7 @@
#include <EditExistingPartitionDialog.h>
#include <PartitionCoreModule.h>
#include <PartitionInfo.h>
#include <ui_EditExistingPartitionDialog.h>
#include <utils/Logger.h>
@ -58,7 +59,11 @@ EditExistingPartitionDialog::mbSizeForSectorRange( qint64 first, qint64 last ) c
}
void
EditExistingPartitionDialog::applyChanges( PartitionCoreModule* module )
EditExistingPartitionDialog::applyChanges( PartitionCoreModule* core )
{
PartitionInfo::setMountPoint( m_partition, m_ui->mountPointComboBox->currentText() );
if ( m_ui->formatRadioButton->isChecked() )
core->formatPartition( m_device, m_partition );
else
core->refresh( m_device );
}

View file

@ -47,10 +47,13 @@
<property name="text">
<string>Content:</string>
</property>
<property name="buddy">
<cstring>keepRadioButton</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QRadioButton" name="radioButton">
<widget class="QRadioButton" name="keepRadioButton">
<property name="text">
<string>Keep</string>
</property>
@ -60,7 +63,7 @@
</widget>
</item>
<item row="2" column="1">
<widget class="QRadioButton" name="radioButton_2">
<widget class="QRadioButton" name="formatRadioButton">
<property name="text">
<string>Format</string>
</property>
@ -142,8 +145,8 @@
</widget>
<tabstops>
<tabstop>sizeSpinBox</tabstop>
<tabstop>radioButton</tabstop>
<tabstop>radioButton_2</tabstop>
<tabstop>keepRadioButton</tabstop>
<tabstop>formatRadioButton</tabstop>
<tabstop>mountPointComboBox</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>

View file

@ -265,6 +265,11 @@ PartitionCoreModule::deletePartition( Device* device, Partition* partition )
refresh( device );
}
void
PartitionCoreModule::formatPartition( Device* device, Partition* partition )
{
}
QList< Calamares::job_ptr >
PartitionCoreModule::jobs() const
{

View file

@ -55,6 +55,8 @@ public:
void deletePartition( Device* device, Partition* partition );
void formatPartition( Device* device, Partition* partition );
QList< Calamares::job_ptr > jobs() const;
bool hasRootMountPoint() const