implemented #92

This commit is contained in:
itsmattkc
2019-03-15 09:59:31 +11:00
parent 058e5b25c5
commit db22704169
27 changed files with 220 additions and 72 deletions
+13 -2
View File
@@ -11,9 +11,20 @@ bool BoolField::GetBoolAt(double timecode)
return GetValueAt(timecode).toBool();
}
QWidget *BoolField::CreateWidget()
QWidget *BoolField::CreateWidget(QWidget *existing)
{
QCheckBox* cb = new QCheckBox();
QCheckBox* cb;
if (existing == nullptr) {
cb = new QCheckBox();
cb->setEnabled(IsEnabled());
} else {
cb = static_cast<QCheckBox*>(existing);
}
connect(cb, SIGNAL(toggled(bool)), this, SLOT(UpdateFromWidget(bool)));
connect(this, SIGNAL(EnabledChanged(bool)), cb, SLOT(setEnabled(bool)));