mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 10:55:46 -05:00
[partition] Chase moving PrettyRadioButton to libcalamaresui
- Update includes - Use exposed API instead of accessing internals of the button
This commit is contained in:
parent
17231ae41f
commit
72857b75d0
2 changed files with 22 additions and 18 deletions
|
@ -35,20 +35,19 @@
|
|||
#include "PartitionBarsView.h"
|
||||
#include "PartitionLabelsView.h"
|
||||
#include "PartitionSplitterWidget.h"
|
||||
#include "PrettyRadioButton.h"
|
||||
#include "ReplaceWidget.h"
|
||||
#include "ScanningDialog.h"
|
||||
|
||||
#include "Branding.h"
|
||||
#include "GlobalStorage.h"
|
||||
#include "JobQueue.h"
|
||||
#include "partition/PartitionIterator.h"
|
||||
#include "partition/PartitionQuery.h"
|
||||
#include "utils/CalamaresUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/Retranslator.h"
|
||||
#include "utils/Units.h"
|
||||
|
||||
#include "Branding.h"
|
||||
#include "utils/CalamaresUtilsGui.h"
|
||||
#include "widgets/PrettyRadioButton.h"
|
||||
|
||||
#include <kpmcore/core/device.h>
|
||||
#include <kpmcore/core/partition.h>
|
||||
|
@ -69,6 +68,7 @@ using PartitionActions::Choices::SwapChoice;
|
|||
using CalamaresUtils::Partition::PartitionIterator;
|
||||
using CalamaresUtils::Partition::isPartitionFreeSpace;
|
||||
using CalamaresUtils::Partition::findPartitionByPath;
|
||||
using Calamares::PrettyRadioButton;
|
||||
|
||||
/** @brief Given a set of swap choices, return a sensible value from it.
|
||||
*
|
||||
|
@ -259,14 +259,14 @@ ChoicePage::setupChoices()
|
|||
m_alongsideButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionAlongside,
|
||||
CalamaresUtils::Original,
|
||||
iconSize ) );
|
||||
m_grp->addButton( m_alongsideButton->buttonWidget(), Alongside );
|
||||
m_alongsideButton->addToGroup( m_grp, Alongside );
|
||||
|
||||
m_eraseButton = new PrettyRadioButton;
|
||||
m_eraseButton->setIconSize( iconSize );
|
||||
m_eraseButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionEraseAuto,
|
||||
CalamaresUtils::Original,
|
||||
iconSize ) );
|
||||
m_grp->addButton( m_eraseButton->buttonWidget(), Erase );
|
||||
m_eraseButton->addToGroup( m_grp, Erase );
|
||||
|
||||
m_replaceButton = new PrettyRadioButton;
|
||||
|
||||
|
@ -274,7 +274,7 @@ ChoicePage::setupChoices()
|
|||
m_replaceButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionReplaceOs,
|
||||
CalamaresUtils::Original,
|
||||
iconSize ) );
|
||||
m_grp->addButton( m_replaceButton->buttonWidget(), Replace );
|
||||
m_replaceButton->addToGroup( m_grp, Replace );
|
||||
|
||||
// Fill up swap options
|
||||
// .. TODO: only if enabled in the config
|
||||
|
@ -294,7 +294,7 @@ ChoicePage::setupChoices()
|
|||
CalamaresUtils::Original,
|
||||
iconSize ) );
|
||||
m_itemsLayout->addWidget( m_somethingElseButton );
|
||||
m_grp->addButton( m_somethingElseButton->buttonWidget(), Manual );
|
||||
m_somethingElseButton->addToGroup( m_grp, Manual );
|
||||
|
||||
m_itemsLayout->addStretch();
|
||||
|
||||
|
@ -1193,7 +1193,7 @@ force_uncheck(QButtonGroup* grp, PrettyRadioButton* button)
|
|||
{
|
||||
button->hide();
|
||||
grp->setExclusive( false );
|
||||
button->buttonWidget()->setChecked( false );
|
||||
button->setChecked( false );
|
||||
grp->setExclusive( true );
|
||||
}
|
||||
|
||||
|
@ -1288,8 +1288,8 @@ ChoicePage::setupActions()
|
|||
m_replaceButton->hide();
|
||||
m_alongsideButton->hide();
|
||||
m_grp->setExclusive( false );
|
||||
m_replaceButton->buttonWidget()->setChecked( false );
|
||||
m_alongsideButton->buttonWidget()->setChecked( false );
|
||||
m_replaceButton->setChecked( false );
|
||||
m_alongsideButton->setChecked( false );
|
||||
m_grp->setExclusive( true );
|
||||
}
|
||||
else if ( osproberEntriesForCurrentDevice.count() == 1 )
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include "ui_ChoicePage.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "core/OsproberEntry.h"
|
||||
#include "core/PartitionActions.h"
|
||||
|
@ -31,17 +30,22 @@
|
|||
#include <QMutex>
|
||||
#include <QPointer>
|
||||
#include <QSet>
|
||||
#include <QWidget>
|
||||
|
||||
class QBoxLayout;
|
||||
class QComboBox;
|
||||
class QLabel;
|
||||
class QListView;
|
||||
|
||||
namespace Calamares
|
||||
{
|
||||
class PrettyRadioButton;
|
||||
}
|
||||
|
||||
class PartitionBarsView;
|
||||
class PartitionSplitterWidget;
|
||||
class PartitionLabelsView;
|
||||
class PartitionCoreModule;
|
||||
class PrettyRadioButton;
|
||||
class DeviceInfoWidget;
|
||||
|
||||
class Device;
|
||||
|
@ -153,10 +157,10 @@ private:
|
|||
QComboBox* m_drivesCombo;
|
||||
|
||||
QButtonGroup* m_grp;
|
||||
PrettyRadioButton* m_alongsideButton;
|
||||
PrettyRadioButton* m_eraseButton;
|
||||
PrettyRadioButton* m_replaceButton;
|
||||
PrettyRadioButton* m_somethingElseButton;
|
||||
Calamares::PrettyRadioButton* m_alongsideButton;
|
||||
Calamares::PrettyRadioButton* m_eraseButton;
|
||||
Calamares::PrettyRadioButton* m_replaceButton;
|
||||
Calamares::PrettyRadioButton* m_somethingElseButton;
|
||||
QComboBox* m_eraseSwapChoiceComboBox; // UI, see also m_eraseSwapChoice
|
||||
|
||||
DeviceInfoWidget* m_deviceInfoWidget;
|
||||
|
@ -182,4 +186,4 @@ private:
|
|||
QMutex m_coreMutex;
|
||||
};
|
||||
|
||||
#endif // CHOICEPAGE_H
|
||||
#endif // CHOICEPAGE_H
|
||||
|
|
Loading…
Add table
Reference in a new issue