|
|
|
@ -26,6 +26,8 @@
|
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
|
#include <QLabel>
|
|
|
|
|
|
|
|
|
|
namespace Calamares
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
PrettyRadioButton::PrettyRadioButton( QWidget* parent )
|
|
|
|
|
: QWidget( parent )
|
|
|
|
@ -45,10 +47,8 @@ PrettyRadioButton::PrettyRadioButton( QWidget* parent )
|
|
|
|
|
m_mainLayout->addWidget( m_label, 0, 1 );
|
|
|
|
|
m_mainLayout->setContentsMargins( 0, 0, 0, 0 );
|
|
|
|
|
|
|
|
|
|
connect( m_label, &ClickableLabel::clicked,
|
|
|
|
|
m_radio, &QRadioButton::click );
|
|
|
|
|
connect( m_radio, &QRadioButton::toggled,
|
|
|
|
|
this, &PrettyRadioButton::toggleOptions );
|
|
|
|
|
connect( m_label, &ClickableLabel::clicked, m_radio, &QRadioButton::click );
|
|
|
|
|
connect( m_radio, &QRadioButton::toggled, this, &PrettyRadioButton::toggleOptions );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -90,7 +90,9 @@ void
|
|
|
|
|
PrettyRadioButton::addOptionsComboBox( QComboBox* box )
|
|
|
|
|
{
|
|
|
|
|
if ( !box )
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( !m_optionsLayout )
|
|
|
|
|
{
|
|
|
|
@ -105,12 +107,16 @@ PrettyRadioButton::addOptionsComboBox( QComboBox* box )
|
|
|
|
|
toggleOptions( m_radio->isChecked() );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
m_optionsLayout->insertWidget( m_optionsLayout->count()-1, box );
|
|
|
|
|
m_optionsLayout->insertWidget( m_optionsLayout->count() - 1, box );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
PrettyRadioButton::toggleOptions( bool toggle )
|
|
|
|
|
{
|
|
|
|
|
if ( m_optionsLayout )
|
|
|
|
|
{
|
|
|
|
|
m_optionsLayout->parentWidget()->setVisible( toggle );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace Calamares
|
|
|
|
|