Olive
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
effectui.h
Go to the documentation of this file.
1 #ifndef EFFECTUI_H
2 #define EFFECTUI_H
3 
4 #include "collapsiblewidget.h"
5 #include "effects/effect.h"
6 
19 class EffectUI : public CollapsibleWidget {
20  Q_OBJECT
21 public:
31  EffectUI(Effect* e);
32 
44  void AddAdditionalEffect(Effect* e);
45 
53  Effect* GetEffect();
54 
77  int GetRowY(int row, QWidget *mapToWidget);
78 
89  void UpdateFromEffect();
90 
112  bool IsAttachedToClip(Clip* c);
113 
114 signals:
120  void CutRequested();
121 
127  void CopyRequested();
128 private:
146  QWidget* Widget(int row, int field);
147 
152 
156  QVector<Effect*> additional_effects_;
157 
161  QGridLayout* layout_;
162 
166  QVector< QVector<QWidget*> > widgets_;
167 
171  QVector<QLabel*> labels_;
172 
176  QVector<KeyframeNavigator*> keyframe_navigators_;
177 
192 private slots:
196  void show_context_menu(const QPoint&);
197 };
198 
199 #endif // EFFECTUI_H
QGridLayout * layout_
Layout for UI widgets.
Definition: effectui.h:161
QVector< KeyframeNavigator * > keyframe_navigators_
Array of KeyframeNavigator objects corresponding to each row.
Definition: effectui.h:176
QVector< Effect * > additional_effects_
Internal array of additional Effect objects attached to this UI.
Definition: effectui.h:156
int GetRowY(int row, QWidget *mapToWidget)
Get the Y position of a given row.
Definition: effectui.cpp:189
void AttachKeyframeNavigationToRow(EffectRow *row, KeyframeNavigator *nav)
Attach a KeyframeNavigator object to an EffectRow.
Definition: effectui.cpp:264
Definition: collapsiblewidget.h:45
QVector< QVector< QWidget * > > widgets_
Grid array of QWidgets corresponding to the Effect&#39;s rows and fields.
Definition: effectui.h:166
void CopyRequested()
Copy signal.
QWidget * Widget(int row, int field)
Retrieve the QWidget corresponding a specific EffectField.
Definition: effectui.cpp:259
void AddAdditionalEffect(Effect *e)
Attach additional effects to this UI.
Definition: effectui.cpp:151
Effect * effect_
Internal reference to the Effect this object was constructed around.
Definition: effectui.h:151
void CutRequested()
Cut signal.
Definition: clip.h:56
The EffectUI class.
Definition: effectui.h:19
Definition: keyframenavigator.h:29
EffectUI(Effect *e)
EffectUI Constructor.
Definition: effectui.cpp:12
void show_context_menu(const QPoint &)
Slot for titlebar&#39;s right-click signal to show a context menu for extra Effect functions.
Definition: effectui.cpp:278
QVector< QLabel * > labels_
Array of QLabel objects corresponding to each row&#39;s name().
Definition: effectui.h:171
void UpdateFromEffect()
Update widgets with the current Effect&#39;s values.
Definition: effectui.cpp:203
bool IsAttachedToClip(Clip *c)
Check if a given Clip has an Effect referenced by this EffectUI.
Definition: effectui.cpp:244
The EffectRow class.
Definition: effectrow.h:51
Effect * GetEffect()
Get the primary Effect that this UI object was created for.
Definition: effectui.cpp:184
Definition: effect.h:136