sweeping vfx rewrite

This commit is contained in:
itsmattkc
2018-08-14 15:50:16 +10:00
parent 8fc4053d5f
commit d549586761
14 changed files with 446 additions and 406 deletions
+9 -29
View File
@@ -9,40 +9,20 @@
#include <QXmlStreamAttributes>
InvertEffect::InvertEffect(Clip* c) : Effect(c, EFFECT_TYPE_VIDEO, VIDEO_INVERT_EFFECT) {
ui_layout->addWidget(new QLabel("Amount:"), 0, 0);
amount_val = new LabelSlider();
ui_layout->addWidget(amount_val, 0, 1);
EffectRow* amount_row = add_row("Amount:");
amount_val = amount_row->add_field(EFFECT_FIELD_DOUBLE);
amount_val->set_double_minimum_value(0);
amount_val->set_double_maximum_value(100);
// set defaults
amount_val->set_minimum_value(0);
amount_val->set_maximum_value(100);
init();
connect(amount_val, SIGNAL(valueChanged()), this, SLOT(field_changed()));
}
void InvertEffect::init() {
amount_val->set_default_value(100);
// set defaults
amount_val->set_double_default_value(100);
}
Effect* InvertEffect::copy(Clip* c) {
InvertEffect* i = new InvertEffect(c);
/*InvertEffect* i = new InvertEffect(c);
i->amount_val->set_value(amount_val->value());
return i;
}
void InvertEffect::load(QXmlStreamReader *stream) {
const QXmlStreamAttributes& attr = stream->attributes();
for (int i=0;i<attr.size();i++) {
const QXmlStreamAttribute& a = attr.at(i);
if (a.name() == "amount") {
amount_val->set_value(a.value().toDouble());
}
}
}
void InvertEffect::save(QXmlStreamWriter *stream) {
stream->writeAttribute("amount", QString::number(amount_val->value()));
return i;*/
return NULL;
}
void InvertEffect::process_gl(int* anchor_x, int* anchor_y) {