improved effects signalling
This commit is contained in:
@@ -0,0 +1,296 @@
|
||||
#include "effect.h"
|
||||
|
||||
#include "panels/panels.h"
|
||||
#include "panels/viewer.h"
|
||||
#include "ui/viewerwidget.h"
|
||||
#include "ui/collapsiblewidget.h"
|
||||
#include "effects/effects.h"
|
||||
#include "panels/project.h"
|
||||
#include "project/undo.h"
|
||||
#include "ui/labelslider.h"
|
||||
#include "ui/colorbutton.h"
|
||||
#include "ui/comboboxex.h"
|
||||
#include "ui/fontcombobox.h"
|
||||
#include "ui/checkboxex.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QGridLayout>
|
||||
#include <QTextEdit>
|
||||
|
||||
Effect::Effect(Clip* c, int t, int i) : parent_clip(c), type(t), id(i) {
|
||||
container = new CollapsibleWidget();
|
||||
if (type == EFFECT_TYPE_VIDEO) {
|
||||
container->setText(video_effect_names[i]);
|
||||
} else if (type == EFFECT_TYPE_AUDIO) {
|
||||
container->setText(audio_effect_names[i]);
|
||||
}
|
||||
connect(container->enabled_check, SIGNAL(clicked(bool)), this, SLOT(field_changed()));
|
||||
ui = new QWidget();
|
||||
|
||||
ui_layout = new QGridLayout();
|
||||
ui->setLayout(ui_layout);
|
||||
container->setContents(ui);
|
||||
}
|
||||
|
||||
Effect::~Effect() {
|
||||
for (int i=0;i<rows.size();i++) {
|
||||
delete rows.at(i);
|
||||
}
|
||||
}
|
||||
|
||||
EffectRow* Effect::add_row(const QString& name) {
|
||||
EffectRow* row = new EffectRow(this, ui_layout, name, rows.size());
|
||||
rows.append(row);
|
||||
return row;
|
||||
}
|
||||
|
||||
EffectRow* Effect::row(int i) {
|
||||
return rows.at(i);
|
||||
}
|
||||
|
||||
void Effect::refresh() {}
|
||||
|
||||
void Effect::field_changed() {
|
||||
panel_viewer->viewer_widget->update();
|
||||
}
|
||||
|
||||
bool Effect::is_enabled() {
|
||||
return container->enabled_check->isChecked();
|
||||
}
|
||||
|
||||
void Effect::load(QXmlStreamReader* stream) {
|
||||
for (int i=0;i<rows.size();i++) {
|
||||
EffectRow* row = rows.at(i);
|
||||
while (!stream->atEnd() && !(stream->name() == "effect" && stream->isEndElement())) {
|
||||
stream->readNext();
|
||||
if (stream->name() == "row" && stream->isStartElement()) {
|
||||
for (int j=0;j<row->fieldCount();j++) {
|
||||
EffectField* field = row->field(j);
|
||||
while (!stream->atEnd() && !(stream->name() == "effect" && stream->isEndElement())) {
|
||||
stream->readNext();
|
||||
if (stream->name() == "field" && stream->isStartElement()) {
|
||||
stream->readNext();
|
||||
switch (field->type) {
|
||||
case EFFECT_FIELD_DOUBLE:
|
||||
field->set_double_value(stream->text().toDouble());
|
||||
break;
|
||||
case EFFECT_FIELD_COLOR:
|
||||
field->set_color_value(QColor(stream->text().toString()));
|
||||
break;
|
||||
case EFFECT_FIELD_STRING:
|
||||
field->set_string_value(stream->text().toString());
|
||||
break;
|
||||
case EFFECT_FIELD_BOOL:
|
||||
field->set_bool_value(stream->text() == "1");
|
||||
break;
|
||||
case EFFECT_FIELD_COMBO:
|
||||
field->set_combo_string(stream->text().toString());
|
||||
break;
|
||||
case EFFECT_FIELD_FONT:
|
||||
field->set_combo_string(stream->text().toString());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Effect::save(QXmlStreamWriter* stream) {
|
||||
for (int i=0;i<rows.size();i++) {
|
||||
EffectRow* row = rows.at(i);
|
||||
stream->writeStartElement("row");
|
||||
for (int j=0;j<row->fieldCount();j++) {
|
||||
EffectField* field = row->field(j);
|
||||
switch (field->type) {
|
||||
case EFFECT_FIELD_DOUBLE:
|
||||
stream->writeTextElement("field", QString::number(field->get_double_value()));
|
||||
break;
|
||||
case EFFECT_FIELD_COLOR:
|
||||
stream->writeTextElement("field", field->get_color_value().name());
|
||||
break;
|
||||
case EFFECT_FIELD_STRING:
|
||||
stream->writeTextElement("field", field->get_string_value());
|
||||
break;
|
||||
case EFFECT_FIELD_BOOL:
|
||||
stream->writeTextElement("field", QString::number(field->get_bool_value()));
|
||||
break;
|
||||
case EFFECT_FIELD_COMBO:
|
||||
stream->writeTextElement("field", field->get_combo_string());
|
||||
break;
|
||||
case EFFECT_FIELD_FONT:
|
||||
stream->writeTextElement("field", field->get_font_name());
|
||||
break;
|
||||
}
|
||||
}
|
||||
stream->writeEndElement(); // row
|
||||
}
|
||||
}
|
||||
|
||||
Effect* Effect::copy(Clip*) {return NULL;}
|
||||
void Effect::process_gl(int*, int*) {}
|
||||
void Effect::post_gl() {}
|
||||
void Effect::process_audio(uint8_t*, int) {}
|
||||
|
||||
/* Effect Row Definitions */
|
||||
|
||||
EffectRow::EffectRow(Effect *parent, QGridLayout *uilayout, const QString &n, int row) : parent_effect(parent), ui(uilayout), name(n), ui_row(row) {
|
||||
ui->addWidget(new QLabel(name), row, 0);
|
||||
}
|
||||
|
||||
EffectField* EffectRow::add_field(int type) {
|
||||
EffectField* field = new EffectField(type);
|
||||
fields.append(field);
|
||||
QWidget* element = field->get_ui_element();
|
||||
ui->addWidget(element, ui_row, fields.size());
|
||||
return field;
|
||||
}
|
||||
|
||||
EffectRow::~EffectRow() {
|
||||
for (int i=0;i<fields.size();i++) {
|
||||
delete fields.at(i);
|
||||
}
|
||||
}
|
||||
|
||||
EffectField* EffectRow::field(int i) {
|
||||
return fields.at(i);
|
||||
}
|
||||
|
||||
int EffectRow::fieldCount() {
|
||||
return fields.size();
|
||||
}
|
||||
|
||||
/* Effect Field Definitions */
|
||||
|
||||
EffectField::EffectField(int t) : type(t) {
|
||||
switch (t) {
|
||||
case EFFECT_FIELD_DOUBLE:
|
||||
{
|
||||
LabelSlider* ls = new LabelSlider();
|
||||
ui_element = ls;
|
||||
connect(ls, SIGNAL(valueChanged()), this, SIGNAL(changed()));
|
||||
}
|
||||
break;
|
||||
case EFFECT_FIELD_COLOR:
|
||||
{
|
||||
ColorButton* cb = new ColorButton();
|
||||
ui_element = cb;
|
||||
connect(cb, SIGNAL(color_changed()), this, SIGNAL(changed()));
|
||||
}
|
||||
break;
|
||||
case EFFECT_FIELD_STRING:
|
||||
{
|
||||
QTextEdit* edit = new QTextEdit();
|
||||
edit->setUndoRedoEnabled(true);
|
||||
ui_element = edit;
|
||||
connect(edit, SIGNAL(textChanged()), this, SIGNAL(changed()));
|
||||
}
|
||||
break;
|
||||
case EFFECT_FIELD_BOOL:
|
||||
{
|
||||
CheckboxEx* cb = new CheckboxEx();
|
||||
ui_element = cb;
|
||||
connect(cb, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
||||
}
|
||||
break;
|
||||
case EFFECT_FIELD_COMBO:
|
||||
{
|
||||
ComboBoxEx* cb = new ComboBoxEx();
|
||||
ui_element = cb;
|
||||
connect(cb, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed()));
|
||||
}
|
||||
break;
|
||||
case EFFECT_FIELD_FONT:
|
||||
{
|
||||
FontCombobox* fcb = new FontCombobox();
|
||||
ui_element = fcb;
|
||||
connect(fcb, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed()));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
QWidget* EffectField::get_ui_element() {
|
||||
return ui_element;
|
||||
}
|
||||
|
||||
void EffectField::set_enabled(bool e) {
|
||||
ui_element->setEnabled(e);
|
||||
}
|
||||
|
||||
double EffectField::get_double_value() {
|
||||
return static_cast<LabelSlider*>(ui_element)->value();
|
||||
}
|
||||
|
||||
void EffectField::set_double_value(double v) {
|
||||
static_cast<LabelSlider*>(ui_element)->set_value(v, false);
|
||||
}
|
||||
|
||||
void EffectField::set_double_default_value(double v) {
|
||||
static_cast<LabelSlider*>(ui_element)->set_default_value(v);
|
||||
}
|
||||
|
||||
void EffectField::set_double_minimum_value(double v) {
|
||||
static_cast<LabelSlider*>(ui_element)->set_minimum_value(v);
|
||||
}
|
||||
|
||||
void EffectField::set_double_maximum_value(double v) {
|
||||
static_cast<LabelSlider*>(ui_element)->set_maximum_value(v);
|
||||
}
|
||||
|
||||
void EffectField::add_combo_item(const QString& name, const QVariant& data) {
|
||||
static_cast<QComboBox*>(ui_element)->addItem(name, data);
|
||||
}
|
||||
|
||||
int EffectField::get_combo_index() {
|
||||
return static_cast<QComboBox*>(ui_element)->currentIndex();
|
||||
}
|
||||
|
||||
const QVariant EffectField::get_combo_data() {
|
||||
return static_cast<QComboBox*>(ui_element)->currentData();
|
||||
}
|
||||
|
||||
const QString EffectField::get_combo_string() {
|
||||
return static_cast<QComboBox*>(ui_element)->currentText();
|
||||
}
|
||||
|
||||
void EffectField::set_combo_index(int index) {
|
||||
static_cast<QComboBox*>(ui_element)->setCurrentIndex(index);
|
||||
}
|
||||
|
||||
void EffectField::set_combo_string(const QString& s) {
|
||||
static_cast<QComboBox*>(ui_element)->setCurrentText(s);
|
||||
}
|
||||
|
||||
bool EffectField::get_bool_value() {
|
||||
return static_cast<QCheckBox*>(ui_element)->isChecked();
|
||||
}
|
||||
|
||||
void EffectField::set_bool_value(bool b) {
|
||||
return static_cast<QCheckBox*>(ui_element)->setChecked(b);
|
||||
}
|
||||
|
||||
const QString EffectField::get_string_value() {
|
||||
return static_cast<QTextEdit*>(ui_element)->toPlainText();
|
||||
}
|
||||
|
||||
void EffectField::set_string_value(const QString& s) {
|
||||
static_cast<QTextEdit*>(ui_element)->setText(s);
|
||||
}
|
||||
|
||||
const QString EffectField::get_font_name() {
|
||||
return static_cast<FontCombobox*>(ui_element)->currentText();
|
||||
}
|
||||
|
||||
QColor EffectField::get_color_value() {
|
||||
return static_cast<ColorButton*>(ui_element)->get_color();
|
||||
}
|
||||
|
||||
void EffectField::set_color_value(QColor color) {
|
||||
static_cast<ColorButton*>(ui_element)->set_color(color);
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
#ifndef EFFECT_H
|
||||
#define EFFECT_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
class QWidget;
|
||||
class CollapsibleWidget;
|
||||
class QGridLayout;
|
||||
|
||||
struct Clip;
|
||||
class QXmlStreamReader;
|
||||
class QXmlStreamWriter;
|
||||
class Effect;
|
||||
|
||||
#define EFFECT_TYPE_INVALID 0
|
||||
#define EFFECT_TYPE_VIDEO 1
|
||||
#define EFFECT_TYPE_AUDIO 2
|
||||
|
||||
#define EFFECT_FIELD_DOUBLE 0
|
||||
#define EFFECT_FIELD_COLOR 1
|
||||
#define EFFECT_FIELD_STRING 2
|
||||
#define EFFECT_FIELD_BOOL 3
|
||||
#define EFFECT_FIELD_COMBO 4
|
||||
#define EFFECT_FIELD_FONT 5
|
||||
|
||||
#define EFFECT_KEYFRAME_LINEAR 0
|
||||
#define EFFECT_KEYFRAME_HOLD 1
|
||||
#define EFFECT_KEYFRAME_BEZIER 2
|
||||
|
||||
class EffectKeyframe {
|
||||
public:
|
||||
long frame;
|
||||
};
|
||||
|
||||
class EffectField : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectField(int t);
|
||||
int type;
|
||||
|
||||
double get_double_value();
|
||||
void set_double_value(double v);
|
||||
void set_double_default_value(double v);
|
||||
void set_double_minimum_value(double v);
|
||||
void set_double_maximum_value(double v);
|
||||
|
||||
const QString get_string_value();
|
||||
void set_string_value(const QString &s);
|
||||
|
||||
void add_combo_item(const QString& name, const QVariant &data);
|
||||
int get_combo_index();
|
||||
const QVariant get_combo_data();
|
||||
const QString get_combo_string();
|
||||
void set_combo_index(int index);
|
||||
void set_combo_string(const QString& s);
|
||||
|
||||
bool get_bool_value();
|
||||
void set_bool_value(bool b);
|
||||
|
||||
const QString get_font_name();
|
||||
|
||||
QColor get_color_value();
|
||||
void set_color_value(QColor color);
|
||||
|
||||
QWidget* get_ui_element();
|
||||
void set_enabled(bool e);
|
||||
signals:
|
||||
void changed();
|
||||
private:
|
||||
QWidget* ui_element;
|
||||
};
|
||||
|
||||
class EffectRow {
|
||||
public:
|
||||
EffectRow(Effect* parent, QGridLayout* uilayout, const QString& n, int row);
|
||||
~EffectRow();
|
||||
EffectField* add_field(int type);
|
||||
EffectField* field(int i);
|
||||
int fieldCount();
|
||||
void set_keyframe(int field, long time);
|
||||
void move_keyframe(int field, long from, long to);
|
||||
void delete_keyframe(int field, long time);
|
||||
private:
|
||||
Effect* parent_effect;
|
||||
QGridLayout* ui;
|
||||
QString name;
|
||||
int ui_row;
|
||||
QVector<EffectField*> fields;
|
||||
};
|
||||
|
||||
class Effect : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
Effect(Clip* c, int t, int i);
|
||||
~Effect();
|
||||
Clip* parent_clip;
|
||||
int type;
|
||||
int id;
|
||||
QString name;
|
||||
CollapsibleWidget* container;
|
||||
|
||||
EffectRow* add_row(const QString &name);
|
||||
EffectRow* row(int i);
|
||||
|
||||
bool is_enabled();
|
||||
|
||||
virtual void refresh();
|
||||
|
||||
virtual Effect* copy(Clip* c);
|
||||
|
||||
void load(QXmlStreamReader* stream);
|
||||
void save(QXmlStreamWriter* stream);
|
||||
|
||||
virtual void process_gl(int* anchor_x, int* anchor_y);
|
||||
virtual void post_gl();
|
||||
virtual void process_audio(quint8* samples, int nb_bytes);
|
||||
public slots:
|
||||
void field_changed();
|
||||
private:
|
||||
QVector<EffectRow*> rows;
|
||||
QGridLayout* ui_layout;
|
||||
QWidget* ui;
|
||||
};
|
||||
|
||||
#endif // EFFECT_H
|
||||
+4
-1
@@ -1,7 +1,7 @@
|
||||
#ifndef EFFECTS_H
|
||||
#define EFFECTS_H
|
||||
|
||||
#include "project/effect.h"
|
||||
#include "effect.h"
|
||||
|
||||
#include <QPixmap>
|
||||
#include <QFont>
|
||||
@@ -98,11 +98,14 @@ public:
|
||||
~TextEffect();
|
||||
void post_gl();
|
||||
Effect* copy(Clip* c);
|
||||
void refresh();
|
||||
|
||||
EffectField* text_val;
|
||||
EffectField* size_val;
|
||||
EffectField* set_color_button;
|
||||
EffectField* set_font_combobox;
|
||||
EffectField* halign_field;
|
||||
EffectField* valign_field;
|
||||
private slots:
|
||||
void update_texture();
|
||||
private:
|
||||
|
||||
@@ -16,6 +16,8 @@ PanEffect::PanEffect(Clip* c) : Effect(c, EFFECT_TYPE_AUDIO, AUDIO_PAN_EFFECT) {
|
||||
|
||||
// set defaults
|
||||
pan_val->set_double_default_value(0);
|
||||
|
||||
connect(pan_val, SIGNAL(changed()), this, SLOT(field_changed()));
|
||||
}
|
||||
|
||||
void PanEffect::refresh() {}
|
||||
|
||||
@@ -31,6 +31,10 @@ ShakeEffect::ShakeEffect(Clip *c) : Effect(c, EFFECT_TYPE_VIDEO, VIDEO_SHAKE_EFF
|
||||
frequency_val->set_double_default_value(10);
|
||||
|
||||
refresh();
|
||||
|
||||
connect(intensity_val, SIGNAL(changed()), this, SLOT(field_changed()));
|
||||
connect(rotation_val, SIGNAL(changed()), this, SLOT(field_changed()));
|
||||
connect(frequency_val, SIGNAL(changed()), this, SLOT(field_changed()));
|
||||
}
|
||||
|
||||
void ShakeEffect::refresh() {
|
||||
|
||||
+52
-29
@@ -38,54 +38,77 @@ TextEffect::TextEffect(Clip *c) :
|
||||
EffectRow* color_row = add_row("Color:");
|
||||
set_color_button = color_row->add_field(EFFECT_FIELD_COLOR);
|
||||
|
||||
connect(static_cast<QTextEdit*>(text_val->get_ui_element()), SIGNAL(textChanged()), this, SLOT(update_texture()));
|
||||
connect(static_cast<LabelSlider*>(size_val->get_ui_element()), SIGNAL(valueChanged()), this, SLOT(update_texture()));
|
||||
connect(static_cast<ColorButton*>(set_color_button->get_ui_element()), SIGNAL(color_changed()), this, SLOT(update_texture()));
|
||||
connect(static_cast<FontCombobox*>(set_font_combobox->get_ui_element()), SIGNAL(currentTextChanged(QString)), this, SLOT(update_texture()));
|
||||
EffectRow* alignment_row = add_row("Alignment:");
|
||||
halign_field = alignment_row->add_field(EFFECT_FIELD_COMBO);
|
||||
halign_field->add_combo_item("Left", Qt::AlignLeft);
|
||||
halign_field->add_combo_item("Center", Qt::AlignHCenter);
|
||||
halign_field->add_combo_item("Right", Qt::AlignRight);
|
||||
halign_field->add_combo_item("Justify", Qt::AlignJustify);
|
||||
valign_field = alignment_row->add_field(EFFECT_FIELD_COMBO);
|
||||
valign_field->add_combo_item("Top", Qt::AlignTop);
|
||||
valign_field->add_combo_item("Center", Qt::AlignVCenter);
|
||||
valign_field->add_combo_item("Bottom", Qt::AlignBottom);
|
||||
|
||||
size_val->set_double_default_value(24);
|
||||
size_val->set_double_default_value(48);
|
||||
text_val->set_string_value("Sample Text");
|
||||
halign_field->set_combo_index(1);
|
||||
valign_field->set_combo_index(1);
|
||||
|
||||
connect(text_val, SIGNAL(changed()), this, SLOT(update_texture()));
|
||||
connect(size_val, SIGNAL(changed()), this, SLOT(update_texture()));
|
||||
connect(set_color_button, SIGNAL(changed()), this, SLOT(update_texture()));
|
||||
connect(set_font_combobox, SIGNAL(changed()), this, SLOT(update_texture()));
|
||||
connect(halign_field, SIGNAL(changed()), this, SLOT(update_texture()));
|
||||
connect(valign_field, SIGNAL(changed()), this, SLOT(update_texture()));
|
||||
|
||||
update_texture();
|
||||
}
|
||||
|
||||
TextEffect::~TextEffect() {
|
||||
destroy_texture();
|
||||
}
|
||||
|
||||
void TextEffect::refresh() {
|
||||
update_texture();
|
||||
}
|
||||
|
||||
void TextEffect::destroy_texture() {
|
||||
texture->destroy();
|
||||
}
|
||||
|
||||
void TextEffect::update_texture() {
|
||||
if (parent_clip->sequence->width != width || parent_clip->sequence->height != height) {
|
||||
width = parent_clip->sequence->width;
|
||||
height = parent_clip->sequence->height;
|
||||
pixmap = QImage(width, height, QImage::Format_ARGB32_Premultiplied);
|
||||
}
|
||||
pixmap.fill(Qt::transparent);
|
||||
if (parent_clip->sequence != NULL) {
|
||||
if (parent_clip->sequence->width != width || parent_clip->sequence->height != height) {
|
||||
width = parent_clip->sequence->width;
|
||||
height = parent_clip->sequence->height;
|
||||
pixmap = QImage(width, height, QImage::Format_ARGB32_Premultiplied);
|
||||
}
|
||||
pixmap.fill(Qt::transparent);
|
||||
|
||||
QPainter p(&pixmap);
|
||||
p.setRenderHint(QPainter::TextAntialiasing, true);
|
||||
QPainter p(&pixmap);
|
||||
p.setRenderHint(QPainter::TextAntialiasing, true);
|
||||
|
||||
// set font
|
||||
font.setFamily(set_font_combobox->get_font_name());
|
||||
font.setPointSize(size_val->get_double_value());
|
||||
font.setStyleHint(QFont::Helvetica, QFont::PreferAntialias);
|
||||
p.setFont(font);
|
||||
// set font
|
||||
font.setFamily(set_font_combobox->get_font_name());
|
||||
font.setPointSize(size_val->get_double_value());
|
||||
font.setStyleHint(QFont::Helvetica, QFont::PreferAntialias);
|
||||
p.setFont(font);
|
||||
|
||||
p.setPen(set_color_button->get_color_value());
|
||||
p.drawText(QRect(0, 0, width, height), Qt::AlignCenter | Qt::TextWordWrap, text_val->get_string_value());
|
||||
p.setPen(set_color_button->get_color_value());
|
||||
p.drawText(QRect(0, 0, width, height), halign_field->get_combo_data().toInt() | valign_field->get_combo_data().toInt() | Qt::TextWordWrap, text_val->get_string_value());
|
||||
|
||||
if (texture == NULL) {
|
||||
texture = new QOpenGLTexture(pixmap);
|
||||
} else {
|
||||
destroy_texture();
|
||||
texture->setData(pixmap);
|
||||
}
|
||||
if (texture == NULL) {
|
||||
texture = new QOpenGLTexture(pixmap);
|
||||
} else {
|
||||
destroy_texture();
|
||||
texture->setData(pixmap);
|
||||
}
|
||||
|
||||
texture->setMinMagFilters(QOpenGLTexture::Linear, QOpenGLTexture::Linear);
|
||||
texture->setMinMagFilters(QOpenGLTexture::Linear, QOpenGLTexture::Linear);
|
||||
|
||||
// queue a repaint of the canvas
|
||||
field_changed();
|
||||
// queue a repaint of the canvas
|
||||
field_changed();
|
||||
}
|
||||
}
|
||||
|
||||
void TextEffect::post_gl() {
|
||||
|
||||
@@ -64,6 +64,16 @@ TransformEffect::TransformEffect(Clip* c) : Effect(c, EFFECT_TYPE_VIDEO, VIDEO_T
|
||||
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_box, SIGNAL(toggled(bool)), this, SLOT(toggle_uniform_scale(bool)));
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ VolumeEffect::VolumeEffect(Clip* c) : Effect(c, EFFECT_TYPE_AUDIO, AUDIO_VOLUME_
|
||||
|
||||
// set defaults
|
||||
volume_val->set_double_default_value(100);
|
||||
|
||||
connect(volume_val, SIGNAL(changed()), this, SLOT(field_changed()));
|
||||
}
|
||||
|
||||
void VolumeEffect::refresh() {}
|
||||
|
||||
Reference in New Issue
Block a user