finished moving field data retrieving to row

This commit is contained in:
itsmattkc
2019-04-11 00:02:50 +10:00
parent 14ae903000
commit d3bc1d4f06
78 changed files with 1189 additions and 676 deletions
+26 -1
View File
@@ -53,6 +53,10 @@ EffectRow::EffectRow(Effect *parent, const QString &id, const QString &name, boo
void EffectRow::AddField(EffectField *field)
{
field->setParent(this);
connect(field, SIGNAL(Clicked()), this, SIGNAL(Clicked()));
connect(field, SIGNAL(Changed()), this, SIGNAL(Changed()));
fields_.append(field);
}
@@ -77,6 +81,27 @@ bool EffectRow::IsKeyframable()
return keyframable_;
}
QVariant EffectRow::GetValueAt(double timecode)
{
Q_ASSERT(FieldCount() == 1);
return Field(0)->GetValueAt(timecode);
}
void EffectRow::SetValueAt(double timecode, const QVariant &value)
{
Q_ASSERT(FieldCount() == 1);
Field(0)->SetValueAt(timecode, value);
}
void EffectRow::SetEnabled(bool enabled)
{
for (int i=0;i<FieldCount();i++) {
Field(i)->SetEnabled(enabled);
}
}
void EffectRow::SetKeyframingEnabled(bool enabled) {
if (enabled == keyframing_) {
return;
@@ -252,7 +277,7 @@ void EffectRow::SetKeyframeOnAllFields(ComboAction* ca) {
KeyframeDataChange* kdc = new KeyframeDataChange(field);
field->SetValueAt(field->Now(), field->GetValueAt(field->Now()));
field->SetValueAt(GetParentEffect()->Now(), field->GetValueAt(GetParentEffect()->Now()));
kdc->SetNewKeyframes();
ca->append(kdc);