mirror of
https://github.com/tnodir/fort
synced 2024-11-15 04:45:59 +00:00
UI: ProgramEdit: Disable blocked Zones/Rules row
This commit is contained in:
parent
aaa34046e0
commit
79145ed9a1
@ -369,7 +369,7 @@ QLayout *ProgramEditDialog::setupMainLayout()
|
||||
|
||||
setupActionsGroup();
|
||||
|
||||
// Zones
|
||||
// Zones/Rules
|
||||
auto zonesRulesLayout = setupZonesRuleLayout();
|
||||
|
||||
// Schedule
|
||||
@ -535,6 +535,8 @@ void ProgramEditDialog::setupActionsGroup()
|
||||
m_btgActions->addButton(m_rbAllow);
|
||||
m_btgActions->addButton(m_rbBlock);
|
||||
m_btgActions->addButton(m_rbKillProcess);
|
||||
|
||||
connect(m_rbAllow, &QRadioButton::toggled, this, &ProgramEditDialog::updateZonesRulesLayout);
|
||||
}
|
||||
|
||||
void ProgramEditDialog::setupAdvancedOptions()
|
||||
@ -744,6 +746,15 @@ QLayout *ProgramEditDialog::setupButtonsLayout()
|
||||
return layout;
|
||||
}
|
||||
|
||||
void ProgramEditDialog::updateZonesRulesLayout()
|
||||
{
|
||||
const bool enabled = m_rbAllow->isChecked();
|
||||
|
||||
m_cbLanOnly->setEnabled(enabled);
|
||||
m_btZones->setEnabled(enabled);
|
||||
m_btSelectRule->setEnabled(enabled);
|
||||
}
|
||||
|
||||
void ProgramEditDialog::updateApplyChild()
|
||||
{
|
||||
const ApplyChildType type = m_appRow.applyParent ? ApplyChildType::FromParent
|
||||
|
@ -87,6 +87,7 @@ private:
|
||||
void setupComboScheduleType();
|
||||
QLayout *setupButtonsLayout();
|
||||
|
||||
void updateZonesRulesLayout();
|
||||
void updateApplyChild();
|
||||
|
||||
void fillEditName();
|
||||
|
Loading…
Reference in New Issue
Block a user