began work setting several timings to use rational rather than long/double

This commit is contained in:
itsmattkc
2019-06-16 15:13:53 -07:00
parent 0acee942f4
commit 771572f65b
63 changed files with 448 additions and 397 deletions
+4 -9
View File
@@ -29,7 +29,7 @@ BoolField::BoolField(NodeIO *parent) :
EffectField(parent, EffectField::EFFECT_FIELD_BOOL)
{}
bool BoolField::GetBoolAt(double timecode)
bool BoolField::GetBoolAt(const rational &timecode)
{
return GetValueAt(timecode).toBool();
}
@@ -56,7 +56,7 @@ QWidget *BoolField::CreateWidget(QWidget *existing)
return cb;
}
void BoolField::UpdateWidgetValue(QWidget *widget, double timecode)
void BoolField::UpdateWidgetValue(QWidget *widget, const rational &timecode)
{
QCheckBox* cb = static_cast<QCheckBox*>(widget);
@@ -65,13 +65,8 @@ void BoolField::UpdateWidgetValue(QWidget *widget, double timecode)
cb->blockSignals(true);
if (qIsNaN(timecode)) {
cb->setTristate(true);
cb->setCheckState(Qt::PartiallyChecked);
} else {
cb->setTristate(false);
cb->setChecked(GetBoolAt(timecode));
}
cb->setTristate(false);
cb->setChecked(GetBoolAt(timecode));
cb->blockSignals(false);