changed effect field struct
This commit is contained in:
@@ -93,7 +93,7 @@ GraphEditor::GraphEditor(QWidget* parent) : QDockWidget(parent), row(NULL) {
|
||||
|
||||
current_row_desc = new QLabel();
|
||||
values->addWidget(current_row_desc);
|
||||
1
|
||||
|
||||
QWidget* central_value_widget = new QWidget();
|
||||
value_layout = new QHBoxLayout();
|
||||
value_layout->setMargin(0);
|
||||
|
||||
+52
-41
@@ -15,60 +15,71 @@
|
||||
class EffectRow;
|
||||
class ComboAction;
|
||||
|
||||
class EffectField : public QObject {
|
||||
Q_OBJECT
|
||||
class EffectKeyframe {
|
||||
public:
|
||||
EffectField(EffectRow* parent, int t, const QString& i);
|
||||
EffectRow* parent_row;
|
||||
int type;
|
||||
QString id;
|
||||
long time;
|
||||
int type;
|
||||
QVariant data;
|
||||
|
||||
QVariant get_previous_data();
|
||||
QVariant get_current_data();
|
||||
double frameToTimecode(long frame);
|
||||
long timecodeToFrame(double timecode);
|
||||
void set_current_data(const QVariant&);
|
||||
void get_keyframe_data(double timecode, int& before, int& after, double& d);
|
||||
QVariant validate_keyframe_data(double timecode, bool async = false);
|
||||
// only for bezier type
|
||||
QPointF pre_handle;
|
||||
QPointF post_handle;
|
||||
};
|
||||
|
||||
double get_double_value(double timecode, bool async = false);
|
||||
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);
|
||||
class EffectField : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectField(EffectRow* parent, int t, const QString& i);
|
||||
EffectRow* parent_row;
|
||||
int type;
|
||||
QString id;
|
||||
|
||||
const QString get_string_value(double timecode, bool async = false);
|
||||
void set_string_value(const QString &s);
|
||||
QVariant get_previous_data();
|
||||
QVariant get_current_data();
|
||||
double frameToTimecode(long frame);
|
||||
long timecodeToFrame(double timecode);
|
||||
void set_current_data(const QVariant&);
|
||||
void get_keyframe_data(double timecode, int& before, int& after, double& d);
|
||||
QVariant validate_keyframe_data(double timecode, bool async = false);
|
||||
|
||||
void add_combo_item(const QString& name, const QVariant &data);
|
||||
int get_combo_index(double timecode, bool async = false);
|
||||
const QVariant get_combo_data(double timecode);
|
||||
const QString get_combo_string(double timecode);
|
||||
void set_combo_index(int index);
|
||||
void set_combo_string(const QString& s);
|
||||
double get_double_value(double timecode, bool async = false);
|
||||
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);
|
||||
|
||||
bool get_bool_value(double timecode, bool async = false);
|
||||
void set_bool_value(bool b);
|
||||
const QString get_string_value(double timecode, bool async = false);
|
||||
void set_string_value(const QString &s);
|
||||
|
||||
const QString get_font_name(double timecode, bool async = false);
|
||||
void set_font_name(const QString& s);
|
||||
void add_combo_item(const QString& name, const QVariant &data);
|
||||
int get_combo_index(double timecode, bool async = false);
|
||||
const QVariant get_combo_data(double timecode);
|
||||
const QString get_combo_string(double timecode);
|
||||
void set_combo_index(int index);
|
||||
void set_combo_string(const QString& s);
|
||||
|
||||
QColor get_color_value(double timecode, bool async = false);
|
||||
void set_color_value(QColor color);
|
||||
bool get_bool_value(double timecode, bool async = false);
|
||||
void set_bool_value(bool b);
|
||||
|
||||
QWidget* get_ui_element();
|
||||
void set_enabled(bool e);
|
||||
QVector<QVariant> keyframe_data;
|
||||
QWidget* ui_element;
|
||||
const QString get_font_name(double timecode, bool async = false);
|
||||
void set_font_name(const QString& s);
|
||||
|
||||
void make_key_from_change(ComboAction* ca);
|
||||
QColor get_color_value(double timecode, bool async = false);
|
||||
void set_color_value(QColor color);
|
||||
|
||||
QWidget* get_ui_element();
|
||||
void set_enabled(bool e);
|
||||
QVector<EffectKeyframe> keyframes;
|
||||
QWidget* ui_element;
|
||||
|
||||
void make_key_from_change(ComboAction* ca);
|
||||
private:
|
||||
bool hasKeyframes();
|
||||
bool hasKeyframes();
|
||||
private slots:
|
||||
void ui_element_change();
|
||||
void ui_element_change();
|
||||
signals:
|
||||
void changed();
|
||||
void toggled(bool);
|
||||
void changed();
|
||||
void toggled(bool);
|
||||
void clicked();
|
||||
};
|
||||
|
||||
|
||||
+20
-23
@@ -16,26 +16,23 @@ class KeyframeNavigator;
|
||||
class ClickableLabel;
|
||||
|
||||
class EffectRow : public QObject {
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectRow(Effect* parent, bool save, QGridLayout* uilayout, const QString& n, int row);
|
||||
~EffectRow();
|
||||
EffectField* add_field(int type, const QString &id, int colspan = 1);
|
||||
EffectField* field(int i);
|
||||
int fieldCount();
|
||||
void set_keyframe_now(ComboAction *ca);
|
||||
void delete_keyframe(KeyframeDelete *kd, int index);
|
||||
void delete_keyframe_at_time(KeyframeDelete* kd, long time);
|
||||
EffectRow(Effect* parent, bool save, QGridLayout* uilayout, const QString& n, int row);
|
||||
~EffectRow();
|
||||
EffectField* add_field(int type, const QString &id, int colspan = 1);
|
||||
EffectField* field(int i);
|
||||
int fieldCount();
|
||||
void set_keyframe_now(ComboAction *ca);
|
||||
void delete_keyframe(KeyframeDelete *kd, int index);
|
||||
void delete_keyframe_at_time(KeyframeDelete* kd, long time);
|
||||
ClickableLabel* label;
|
||||
Effect* parent_effect;
|
||||
bool savable;
|
||||
Effect* parent_effect;
|
||||
bool savable;
|
||||
const QString& get_name();
|
||||
|
||||
bool isKeyframing();
|
||||
void setKeyframing(bool);
|
||||
|
||||
QVector<long> keyframe_times;
|
||||
QVector<int> keyframe_types;
|
||||
bool isKeyframing();
|
||||
void setKeyframing(bool);
|
||||
public slots:
|
||||
void goto_previous_key();
|
||||
void toggle_key();
|
||||
@@ -44,15 +41,15 @@ public slots:
|
||||
private slots:
|
||||
void set_keyframe_enabled(bool);
|
||||
private:
|
||||
bool keyframing;
|
||||
QGridLayout* ui;
|
||||
QString name;
|
||||
int ui_row;
|
||||
QVector<EffectField*> fields;
|
||||
bool keyframing;
|
||||
QGridLayout* ui;
|
||||
QString name;
|
||||
int ui_row;
|
||||
QVector<EffectField*> fields;
|
||||
|
||||
KeyframeNavigator* keyframe_nav;
|
||||
KeyframeNavigator* keyframe_nav;
|
||||
|
||||
bool just_made_unsafe_keyframe;
|
||||
bool just_made_unsafe_keyframe;
|
||||
};
|
||||
|
||||
#endif // EFFECTROW_H
|
||||
|
||||
Reference in New Issue
Block a user