chore(cpn): implement ui bindings to auto widgets and apply to timers (#7331)

This commit is contained in:
Neil Horne
2026-06-16 17:14:57 +10:00
committed by GitHub
parent 4ebf3486f1
commit 892410b797
41 changed files with 791 additions and 178 deletions
+12 -7
View File
@@ -34,6 +34,16 @@ AutoCheckBox::~AutoCheckBox()
{
}
void AutoCheckBox::onToggled(bool checked)
{
if (m_field && !lock()) {
const bool val = m_invert ? !checked : checked;
*m_field = val;
emit currentDataChanged(val);
runPostChanged();
}
}
void AutoCheckBox::setField(bool & field, GenericPanel * panel, bool invert)
{
m_field = &field;
@@ -48,14 +58,9 @@ void AutoCheckBox::setInvert(bool invert)
updateValue();
}
void AutoCheckBox::onToggled(bool checked)
void AutoCheckBox::setAutoText(QString text)
{
if (m_field && !lock()) {
const bool val = m_invert ? !checked : checked;
*m_field = val;
emit currentDataChanged(val);
dataChanged();
}
QCheckBox::setText(text);
}
void AutoCheckBox::updateValue()