[partition] Create swap-combo from a set
- Alternate way to create swap-combobox, using configuration values rather than an initializer list.
This commit is contained in:
parent
988a0a5388
commit
edc6c64657
@ -194,6 +194,16 @@ createCombo( std::initializer_list< SwapChoice > l )
|
|||||||
return box;
|
return box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline QComboBox*
|
||||||
|
createCombo( const QSet< SwapChoice >& s )
|
||||||
|
{
|
||||||
|
QComboBox* box = new QComboBox;
|
||||||
|
for ( SwapChoice c : { SwapChoice::NoSwap, SwapChoice::SmallSwap, SwapChoice::FullSwap, SwapChoice::ReuseSwap, SwapChoice::SwapFile } )
|
||||||
|
if ( s.contains( c ) )
|
||||||
|
box->addItem( QString(), c );
|
||||||
|
return box;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief ChoicePage::setupChoices creates PrettyRadioButton objects for the action
|
* @brief ChoicePage::setupChoices creates PrettyRadioButton objects for the action
|
||||||
* choices.
|
* choices.
|
||||||
|
Loading…
Reference in New Issue
Block a user