Olive
effectrow.h
Go to the documentation of this file.
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);
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 
71 
73  QVector<int> unsafe_keys;
74  QVector<QVariant> unsafe_old_data;
75  QVector<bool> key_is_new;
76 
78 };
79 
80 #endif // EFFECTROW_H
int column_count
Definition: effectrow.h:77
bool keyframing
Definition: effectrow.h:63
Definition: keyframenavigator.h:29
QGridLayout * ui
Definition: effectrow.h:64
void set_keyframe_enabled(bool)
Definition: effectrow.cpp:89
void setKeyframing(bool)
Definition: effectrow.cpp:80
QVector< int > unsafe_keys
Definition: effectrow.h:73
The ClickableLabel class.
Definition: clickablelabel.h:31
The ComboAction class.
Definition: comboaction.h:19
~EffectRow()
Definition: effectrow.cpp:70
QVector< EffectField * > fields
Definition: effectrow.h:67
void toggle_key()
Definition: effectrow.cpp:132
Definition: effect.h:169
KeyframeNavigator * keyframe_nav
Definition: effectrow.h:70
void delete_keyframe_at_time(ComboAction *ca, long time)
Definition: effectrow.cpp:290
void focus_row()
Definition: effectrow.cpp:175
Definition: effectrow.h:37
void add_widget(QWidget *w)
Definition: effectrow.cpp:190
ClickableLabel * label
Definition: effectrow.h:48
void goto_next_key()
Definition: effectrow.cpp:160
bool savable
Definition: effectrow.h:50
QVector< bool > key_is_new
Definition: effectrow.h:75
int fieldCount()
Definition: effectrow.cpp:310
QString name
Definition: effectrow.h:65
const QString & get_name()
Definition: effectrow.cpp:302
int ui_row
Definition: effectrow.h:66
EffectField * field(int i)
Definition: effectrow.cpp:306
bool just_made_unsafe_keyframe
Definition: effectrow.h:72
Effect * parent_effect
Definition: effectrow.h:49
QVector< QWidget * > widgets
Definition: effectrow.h:68
EffectField * add_field(int type, const QString &id, int colspan=1)
Definition: effectrow.cpp:179
bool isKeyframing()
Definition: effectrow.cpp:76
EffectRow(Effect *parent, bool save, QGridLayout *uilayout, const QString &n, int row, bool keyframable=true)
Definition: effectrow.cpp:39
Definition: effectfield.h:43
void goto_previous_key()
Definition: effectrow.cpp:117
QVector< QVariant > unsafe_old_data
Definition: effectrow.h:74
void set_keyframe_now(ComboAction *ca)
Definition: effectrow.cpp:196