diff --git a/effects/internal/audionoiseeffect.cpp b/effects/internal/audionoiseeffect.cpp index c86c5f38d..bd0283a5b 100644 --- a/effects/internal/audionoiseeffect.cpp +++ b/effects/internal/audionoiseeffect.cpp @@ -12,10 +12,7 @@ AudioNoiseEffect::AudioNoiseEffect(Clip* c, const EffectMeta *em) : Effect(c, em mix_val = add_row("Mix:")->add_field(EFFECT_FIELD_BOOL, "mix"); mix_val->set_bool_value(true); - srand(QDateTime::currentMSecsSinceEpoch()); - - connect(amount_val, SIGNAL(changed()), this, SLOT(field_changed())); - connect(mix_val, SIGNAL(changed()), this, SLOT(field_changed())); + srand(QDateTime::currentMSecsSinceEpoch()); } void AudioNoiseEffect::process_audio(double timecode_start, double timecode_end, quint8 *samples, int nb_bytes, int) { diff --git a/effects/internal/cornerpineffect.cpp b/effects/internal/cornerpineffect.cpp index 994d5bb6b..1f8650e0e 100644 --- a/effects/internal/cornerpineffect.cpp +++ b/effects/internal/cornerpineffect.cpp @@ -25,17 +25,7 @@ CornerPinEffect::CornerPinEffect(Clip *c, const EffectMeta *em) : Effect(c, em) bottom_right_y = bottom_right->add_field(EFFECT_FIELD_DOUBLE, "bottomrighty"); perspective = add_row("Perspective:")->add_field(EFFECT_FIELD_BOOL, "perspective"); - perspective->set_bool_value(true); - - connect(top_left_x, SIGNAL(changed()), this, SLOT(field_changed())); - connect(top_left_y, SIGNAL(changed()), this, SLOT(field_changed())); - connect(top_right_x, SIGNAL(changed()), this, SLOT(field_changed())); - connect(top_right_y, SIGNAL(changed()), this, SLOT(field_changed())); - connect(bottom_left_x, SIGNAL(changed()), this, SLOT(field_changed())); - connect(bottom_left_y, SIGNAL(changed()), this, SLOT(field_changed())); - connect(bottom_right_x, SIGNAL(changed()), this, SLOT(field_changed())); - connect(bottom_right_y, SIGNAL(changed()), this, SLOT(field_changed())); - connect(perspective, SIGNAL(changed()), this, SLOT(field_changed())); + perspective->set_bool_value(true); vertPath = "cornerpin.vert"; fragPath = "cornerpin.frag"; diff --git a/effects/internal/crossdissolvetransition.cpp b/effects/internal/crossdissolvetransition.cpp index 06183138a..527698fb6 100644 --- a/effects/internal/crossdissolvetransition.cpp +++ b/effects/internal/crossdissolvetransition.cpp @@ -4,6 +4,8 @@ CrossDissolveTransition::CrossDissolveTransition(Clip* c, Clip* s, const EffectMeta* em) : Transition(c, s, em) { enable_coords = true; + + add_row("Smooth")->add_field(EFFECT_FIELD_BOOL, "smooth"); } void CrossDissolveTransition::process_coords(double progress, GLTextureCoords&, int data) { diff --git a/effects/internal/paneffect.cpp b/effects/internal/paneffect.cpp index a9fff136a..0a7b25a58 100644 --- a/effects/internal/paneffect.cpp +++ b/effects/internal/paneffect.cpp @@ -15,9 +15,7 @@ PanEffect::PanEffect(Clip* c, const EffectMeta *em) : Effect(c, em) { pan_val->set_double_maximum_value(100); // set defaults - pan_val->set_double_default_value(0); - - connect(pan_val, SIGNAL(changed()), this, SLOT(field_changed())); + pan_val->set_double_default_value(0); } void PanEffect::process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int) { diff --git a/effects/internal/shakeeffect.cpp b/effects/internal/shakeeffect.cpp index 7460658e4..0687a71ad 100644 --- a/effects/internal/shakeeffect.cpp +++ b/effects/internal/shakeeffect.cpp @@ -38,10 +38,6 @@ ShakeEffect::ShakeEffect(Clip *c, const EffectMeta *em) : Effect(c, em) { for (int i=0;iset_double_minimum_value(1); checkerboard_size_field->set_double_default_value(10); - connect(solid_type, SIGNAL(changed()), this, SLOT(field_changed())); - connect(solid_color_field, SIGNAL(changed()), this, SLOT(field_changed())); - connect(opacity_field, SIGNAL(changed()), this, SLOT(field_changed())); - connect(checkerboard_size_field, SIGNAL(changed()), this, SLOT(field_changed())); - // hacky but eh QComboBox* solid_type_combo = static_cast(solid_type->get_ui_element()); connect(solid_type_combo, SIGNAL(currentIndexChanged(int)), this, SLOT(ui_update(int))); diff --git a/effects/internal/texteffect.cpp b/effects/internal/texteffect.cpp index e34f4c080..2fae8d2f0 100644 --- a/effects/internal/texteffect.cpp +++ b/effects/internal/texteffect.cpp @@ -76,23 +76,7 @@ TextEffect::TextEffect(Clip *c, const EffectMeta* em) : outline_width->set_double_default_value(20); outline_enable(false); - shadow_enable(false); - - connect(text_val, SIGNAL(changed()), this, SLOT(field_changed())); - connect(size_val, SIGNAL(changed()), this, SLOT(field_changed())); - connect(set_color_button, SIGNAL(changed()), this, SLOT(field_changed())); - connect(set_font_combobox, SIGNAL(changed()), this, SLOT(field_changed())); - connect(halign_field, SIGNAL(changed()), this, SLOT(field_changed())); - connect(valign_field, SIGNAL(changed()), this, SLOT(field_changed())); - connect(word_wrap_field, SIGNAL(changed()), this, SLOT(field_changed())); - connect(outline_bool, SIGNAL(changed()), this, SLOT(field_changed())); - connect(outline_color, SIGNAL(changed()), this, SLOT(field_changed())); - connect(outline_width, SIGNAL(changed()), this, SLOT(field_changed())); - connect(shadow_bool, SIGNAL(changed()), this, SLOT(field_changed())); - connect(shadow_color, SIGNAL(changed()), this, SLOT(field_changed())); - connect(shadow_distance, SIGNAL(changed()), this, SLOT(field_changed())); - connect(shadow_softness, SIGNAL(changed()), this, SLOT(field_changed())); - connect(shadow_opacity, SIGNAL(changed()), this, SLOT(field_changed())); + shadow_enable(false); connect(shadow_bool, SIGNAL(toggled(bool)), this, SLOT(shadow_enable(bool))); connect(outline_bool, SIGNAL(toggled(bool)), this, SLOT(outline_enable(bool))); diff --git a/effects/internal/toneeffect.cpp b/effects/internal/toneeffect.cpp index 873a70817..bb0fb7ac8 100644 --- a/effects/internal/toneeffect.cpp +++ b/effects/internal/toneeffect.cpp @@ -23,11 +23,7 @@ ToneEffect::ToneEffect(Clip* c, const EffectMeta *em) : Effect(c, em), sinX(INT_ amount_val->set_double_default_value(25); mix_val = add_row("Mix:")->add_field(EFFECT_FIELD_BOOL, "mix"); - mix_val->set_bool_value(true); - - connect(freq_val, SIGNAL(changed()), this, SLOT(field_changed())); - connect(amount_val, SIGNAL(changed()), this, SLOT(field_changed())); - connect(mix_val, SIGNAL(changed()), this, SLOT(field_changed())); + mix_val->set_bool_value(true); } void ToneEffect::process_audio(double timecode_start, double timecode_end, quint8 *samples, int nb_bytes, int) { diff --git a/effects/internal/transformeffect.cpp b/effects/internal/transformeffect.cpp index 894b291e2..52cf6d7eb 100644 --- a/effects/internal/transformeffect.cpp +++ b/effects/internal/transformeffect.cpp @@ -65,16 +65,6 @@ TransformEffect::TransformEffect(Clip* c, const EffectMeta* em) : Effect(c, em) blend_mode_box->set_combo_index(0); refresh(); - connect(position_x, SIGNAL(changed()), this, SLOT(field_changed())); - connect(position_y, SIGNAL(changed()), this, SLOT(field_changed())); - connect(scale_x, SIGNAL(changed()), this, SLOT(field_changed())); - connect(scale_y, SIGNAL(changed()), this, SLOT(field_changed())); - connect(uniform_scale_field, SIGNAL(changed()), this, SLOT(field_changed())); - connect(rotation, SIGNAL(changed()), this, SLOT(field_changed())); - connect(anchor_x_box, SIGNAL(changed()), this, SLOT(field_changed())); - connect(anchor_y_box, SIGNAL(changed()), this, SLOT(field_changed())); - connect(opacity, SIGNAL(changed()), this, SLOT(field_changed())); - connect(blend_mode_box, SIGNAL(changed()), this, SLOT(field_changed())); connect(uniform_scale_field, SIGNAL(toggled(bool)), this, SLOT(toggle_uniform_scale(bool))); } diff --git a/effects/internal/volumeeffect.cpp b/effects/internal/volumeeffect.cpp index a876e810d..6a71d06a7 100644 --- a/effects/internal/volumeeffect.cpp +++ b/effects/internal/volumeeffect.cpp @@ -14,9 +14,7 @@ VolumeEffect::VolumeEffect(Clip* c, const EffectMeta *em) : Effect(c, em) { volume_val->set_double_minimum_value(0); // set defaults - volume_val->set_double_default_value(100); - - connect(volume_val, SIGNAL(changed()), this, SLOT(field_changed())); + volume_val->set_double_default_value(100); } void VolumeEffect::process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int) { diff --git a/project/effectrow.cpp b/project/effectrow.cpp index 0772162f0..c3804be1f 100644 --- a/project/effectrow.cpp +++ b/project/effectrow.cpp @@ -149,6 +149,7 @@ EffectField* EffectRow::add_field(int type, const QString& id, int colspan) { fields.append(field); QWidget* element = field->get_ui_element(); ui->addWidget(element, ui_row, fields.size(), 1, colspan); + connect(field, SIGNAL(changed()), parent_effect, SLOT(field_changed())); return field; }