[partition] ChoicePage to use Config object
This commit is contained in:
parent
d103c42091
commit
824dac62d8
@ -20,7 +20,15 @@
|
|||||||
|
|
||||||
#include "ChoicePage.h"
|
#include "ChoicePage.h"
|
||||||
|
|
||||||
|
#include "BootInfoWidget.h"
|
||||||
|
#include "DeviceInfoWidget.h"
|
||||||
|
#include "PartitionBarsView.h"
|
||||||
|
#include "PartitionLabelsView.h"
|
||||||
|
#include "PartitionSplitterWidget.h"
|
||||||
|
#include "ReplaceWidget.h"
|
||||||
|
#include "ScanningDialog.h"
|
||||||
#include "core/BootLoaderModel.h"
|
#include "core/BootLoaderModel.h"
|
||||||
|
#include "core/Config.h"
|
||||||
#include "core/DeviceModel.h"
|
#include "core/DeviceModel.h"
|
||||||
#include "core/KPMHelpers.h"
|
#include "core/KPMHelpers.h"
|
||||||
#include "core/OsproberEntry.h"
|
#include "core/OsproberEntry.h"
|
||||||
@ -30,14 +38,6 @@
|
|||||||
#include "core/PartitionInfo.h"
|
#include "core/PartitionInfo.h"
|
||||||
#include "core/PartitionModel.h"
|
#include "core/PartitionModel.h"
|
||||||
|
|
||||||
#include "BootInfoWidget.h"
|
|
||||||
#include "DeviceInfoWidget.h"
|
|
||||||
#include "PartitionBarsView.h"
|
|
||||||
#include "PartitionLabelsView.h"
|
|
||||||
#include "PartitionSplitterWidget.h"
|
|
||||||
#include "ReplaceWidget.h"
|
|
||||||
#include "ScanningDialog.h"
|
|
||||||
|
|
||||||
#include "Branding.h"
|
#include "Branding.h"
|
||||||
#include "GlobalStorage.h"
|
#include "GlobalStorage.h"
|
||||||
#include "JobQueue.h"
|
#include "JobQueue.h"
|
||||||
@ -75,8 +75,9 @@ using Calamares::PrettyRadioButton;
|
|||||||
* the module loading code path.
|
* the module loading code path.
|
||||||
* @param parent the QWidget parent.
|
* @param parent the QWidget parent.
|
||||||
*/
|
*/
|
||||||
ChoicePage::ChoicePage( const SwapChoiceSet& swapChoices, QWidget* parent )
|
ChoicePage::ChoicePage( Config* config, QWidget* parent )
|
||||||
: QWidget( parent )
|
: QWidget( parent )
|
||||||
|
, m_config( config )
|
||||||
, m_nextEnabled( false )
|
, m_nextEnabled( false )
|
||||||
, m_core( nullptr )
|
, m_core( nullptr )
|
||||||
, m_choice( NoChoice )
|
, m_choice( NoChoice )
|
||||||
@ -93,8 +94,8 @@ ChoicePage::ChoicePage( const SwapChoiceSet& swapChoices, QWidget* parent )
|
|||||||
, m_bootloaderComboBox( nullptr )
|
, m_bootloaderComboBox( nullptr )
|
||||||
, m_lastSelectedDeviceIndex( -1 )
|
, m_lastSelectedDeviceIndex( -1 )
|
||||||
, m_enableEncryptionWidget( true )
|
, m_enableEncryptionWidget( true )
|
||||||
, m_availableSwapChoices( swapChoices )
|
, m_availableSwapChoices( config->swapChoices() )
|
||||||
, m_eraseSwapChoice( PartitionActions::Choices::pickOne( swapChoices ) )
|
, m_eraseSwapChoice( PartitionActions::Choices::pickOne( m_availableSwapChoices ) )
|
||||||
, m_allowManualPartitioning( true )
|
, m_allowManualPartitioning( true )
|
||||||
{
|
{
|
||||||
setupUi( this );
|
setupUi( this );
|
||||||
|
@ -42,11 +42,12 @@ namespace Calamares
|
|||||||
class PrettyRadioButton;
|
class PrettyRadioButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Config;
|
||||||
|
class DeviceInfoWidget;
|
||||||
class PartitionBarsView;
|
class PartitionBarsView;
|
||||||
class PartitionSplitterWidget;
|
class PartitionSplitterWidget;
|
||||||
class PartitionLabelsView;
|
class PartitionLabelsView;
|
||||||
class PartitionCoreModule;
|
class PartitionCoreModule;
|
||||||
class DeviceInfoWidget;
|
|
||||||
|
|
||||||
class Device;
|
class Device;
|
||||||
|
|
||||||
@ -70,7 +71,7 @@ public:
|
|||||||
Manual
|
Manual
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit ChoicePage( const SwapChoiceSet& swapChoices, QWidget* parent = nullptr );
|
explicit ChoicePage( Config* config, QWidget* parent = nullptr );
|
||||||
virtual ~ChoicePage();
|
virtual ~ChoicePage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -147,6 +148,7 @@ private:
|
|||||||
// Translations support
|
// Translations support
|
||||||
void updateSwapChoicesTr( QComboBox* box );
|
void updateSwapChoicesTr( QComboBox* box );
|
||||||
|
|
||||||
|
Config* m_config;
|
||||||
bool m_nextEnabled;
|
bool m_nextEnabled;
|
||||||
PartitionCoreModule* m_core;
|
PartitionCoreModule* m_core;
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ void
|
|||||||
PartitionViewStep::continueLoading()
|
PartitionViewStep::continueLoading()
|
||||||
{
|
{
|
||||||
Q_ASSERT( !m_choicePage );
|
Q_ASSERT( !m_choicePage );
|
||||||
m_choicePage = new ChoicePage( m_config->swapChoices() );
|
m_choicePage = new ChoicePage( m_config );
|
||||||
m_choicePage->init( m_core );
|
m_choicePage->init( m_core );
|
||||||
m_widget->addWidget( m_choicePage );
|
m_widget->addWidget( m_choicePage );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user