Olive
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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 #include "effectfields.h"
38 
51 class EffectRow : public QObject {
52  Q_OBJECT
53 public:
78  EffectRow(Effect* parent, const QString& n, bool savable = true, bool keyframable = true);
79 
90  void AddField(EffectField* Field);
91 
103  EffectField* Field(int i);
104 
111  int FieldCount();
112 
121 
130 
136  const QString& name();
137 
143  bool IsKeyframing();
144 
151  void SetKeyframingInternal(bool);
152 
158  bool IsSavable();
159 
165  bool IsKeyframable();
166 public slots:
174  void GoToPreviousKeyframe();
175 
184  void ToggleKeyframe();
185 
193  void GoToNextKeyframe();
194 
200  void FocusRow();
201 signals:
211  void KeyframingSetChanged(bool);
212 private slots:
223  void SetKeyframingEnabled(bool);
224 private:
230  QString name_;
231 
238 
245 
251  bool savable_;
252 
259  QVector<EffectField*> fields_;
260 };
261 
262 #endif // EFFECTROW_H
void SetKeyframeOnAllFields(ComboAction *ca)
Set a keyframe at the current playhead on all fields contained within this row.
Definition: effectrow.cpp:248
void SetKeyframingInternal(bool)
Set whether this row is keyframing or not.
Definition: effectrow.cpp:62
int FieldCount()
Number of fields currently contained in this row.
Definition: effectrow.cpp:276
bool keyframing_
Internal variable for whether this row is currently keyframing.
Definition: effectrow.h:244
bool savable_
Internal variable for whether this row should be saved.
Definition: effectrow.h:251
void FocusRow()
Slot for whenever this EffectRow is focused.
Definition: effectrow.cpp:244
EffectField * Field(int i)
Retrieve the EffectField at this index. Must be less than FieldCount().
Definition: effectrow.cpp:272
The ClickableLabel class.
Definition: clickablelabel.h:31
bool IsSavable()
Get whether this row should be saved into a project file or not.
Definition: effectrow.cpp:69
const QString & name()
Return the row&#39;s name.
Definition: effectrow.cpp:268
QString name_
Internal variable for the row&#39;s name.
Definition: effectrow.h:230
bool keyframable_
Internal variable for whether this row can be keyframed.
Definition: effectrow.h:237
Definition: keyframenavigator.h:29
The ComboAction class.
Definition: comboaction.h:19
bool IsKeyframable()
Get whether this row can be keyframed or not.
Definition: effectrow.cpp:74
bool IsKeyframing()
Get whether this row is keyframing or not.
Definition: effectrow.cpp:58
QVector< EffectField * > fields_
Internal array of EffectField objects.
Definition: effectrow.h:259
Effect * GetParentEffect()
Get parent Effect.
Definition: effectrow.cpp:263
void GoToNextKeyframe()
Go to next keyframe.
Definition: effectrow.cpp:229
The EffectField class.
Definition: effectfield.h:56
void ToggleKeyframe()
Toggle a keyframe at this point in time.
Definition: effectrow.cpp:159
void GoToPreviousKeyframe()
Go to previous keyframe.
Definition: effectrow.cpp:131
EffectRow(Effect *parent, const QString &n, bool savable=true, bool keyframable=true)
EffectRow Constructor.
Definition: effectrow.cpp:40
void KeyframingSetChanged(bool)
Keyframing setting changed signal.
void SetKeyframingEnabled(bool)
Set keyframing enabled state.
Definition: effectrow.cpp:79
The EffectRow class.
Definition: effectrow.h:51
Definition: effect.h:136
void AddField(EffectField *Field)
Add a field to this row.
Definition: effectrow.cpp:52