mirror of
https://github.com/tnodir/fort
synced 2024-11-15 04:15:22 +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();
|
setupActionsGroup();
|
||||||
|
|
||||||
// Zones
|
// Zones/Rules
|
||||||
auto zonesRulesLayout = setupZonesRuleLayout();
|
auto zonesRulesLayout = setupZonesRuleLayout();
|
||||||
|
|
||||||
// Schedule
|
// Schedule
|
||||||
@ -535,6 +535,8 @@ void ProgramEditDialog::setupActionsGroup()
|
|||||||
m_btgActions->addButton(m_rbAllow);
|
m_btgActions->addButton(m_rbAllow);
|
||||||
m_btgActions->addButton(m_rbBlock);
|
m_btgActions->addButton(m_rbBlock);
|
||||||
m_btgActions->addButton(m_rbKillProcess);
|
m_btgActions->addButton(m_rbKillProcess);
|
||||||
|
|
||||||
|
connect(m_rbAllow, &QRadioButton::toggled, this, &ProgramEditDialog::updateZonesRulesLayout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProgramEditDialog::setupAdvancedOptions()
|
void ProgramEditDialog::setupAdvancedOptions()
|
||||||
@ -744,6 +746,15 @@ QLayout *ProgramEditDialog::setupButtonsLayout()
|
|||||||
return layout;
|
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()
|
void ProgramEditDialog::updateApplyChild()
|
||||||
{
|
{
|
||||||
const ApplyChildType type = m_appRow.applyParent ? ApplyChildType::FromParent
|
const ApplyChildType type = m_appRow.applyParent ? ApplyChildType::FromParent
|
||||||
|
@ -87,6 +87,7 @@ private:
|
|||||||
void setupComboScheduleType();
|
void setupComboScheduleType();
|
||||||
QLayout *setupButtonsLayout();
|
QLayout *setupButtonsLayout();
|
||||||
|
|
||||||
|
void updateZonesRulesLayout();
|
||||||
void updateApplyChild();
|
void updateApplyChild();
|
||||||
|
|
||||||
void fillEditName();
|
void fillEditName();
|
||||||
|
Loading…
Reference in New Issue
Block a user