Olive
effectrow.h
1 /***
2 
3  Olive - Non-Linear Video Editor
4  Copyright (C) 2019 Olive Team
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 ***/
20 
21 #ifndef EFFECTROW_H
22 #define EFFECTROW_H
23 
24 #include <QObject>
25 #include <QVector>
26 
27 class Effect;
28 class QGridLayout;
29 class EffectField;
30 class QLabel;
31 class QPushButton;
32 class ComboAction;
33 class QHBoxLayout;
34 class KeyframeNavigator;
35 class ClickableLabel;
36 
37 class EffectRow : public QObject {
38  Q_OBJECT
39 public:
40  EffectRow(Effect* parent, bool save, QGridLayout* uilayout, const QString& n, int row, bool keyframable = true);
41  ~EffectRow();
42  EffectField* add_field(int type, const QString &id, int colspan = 1);
43  void add_widget(QWidget *w);
44  EffectField* field(int i);
45  int fieldCount();
46  void set_keyframe_now(ComboAction *ca);
47  void delete_keyframe_at_time(ComboAction *ca, long time);
48  ClickableLabel* label;
49  Effect* parent_effect;
50  bool savable;
51  const QString& get_name();
52 
53  bool isKeyframing();
54  void setKeyframing(bool);
55 public slots:
56  void goto_previous_key();
57  void toggle_key();
58  void goto_next_key();
59  void focus_row();
60 private slots:
61  void set_keyframe_enabled(bool);
62 private:
63  bool keyframing;
64  QGridLayout* ui;
65  QString name;
66  int ui_row;
67  QVector<EffectField*> fields;
68  QVector<QWidget*> widgets;
69 
70  KeyframeNavigator* keyframe_nav;
71 
72  bool just_made_unsafe_keyframe;
73  QVector<int> unsafe_keys;
74  QVector<QVariant> unsafe_old_data;
75  QVector<bool> key_is_new;
76 
77  int column_count;
78 };
79 
80 #endif // EFFECTROW_H
Definition: keyframenavigator.h:29
The ClickableLabel class.
Definition: clickablelabel.h:31
Definition: undo.h:52
Definition: effect.h:166
Definition: effectrow.h:37
Definition: effectfield.h:43