Olive
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
grapheditor.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 GRAPHEDITOR_H
22 #define GRAPHEDITOR_H
23 
24 #include <QPushButton>
25 #include <QHBoxLayout>
26 #include <QLabel>
27 
28 #include "ui/panel.h"
29 #include "ui/graphview.h"
30 #include "ui/timelineheader.h"
31 #include "ui/labelslider.h"
32 #include "ui/keyframenavigator.h"
33 #include "effects/effectrow.h"
34 
35 class GraphEditor : public Panel {
36  Q_OBJECT
37 public:
38  GraphEditor(QWidget* parent = nullptr);
39 
40  EffectRow* get_row();
41  void set_row(EffectRow* r);
42 
43  void update_panel();
44  bool view_is_focused();
45  bool view_is_under_mouse();
46  void delete_selected_keys();
47  void select_all();
48 
49  virtual void Retranslate() override;
50 protected:
51 private:
54  QHBoxLayout* value_layout;
55  QVector<LabelSlider*> field_sliders_;
56  QVector<QPushButton*> field_enable_buttons;
60  QPushButton* linear_button;
61  QPushButton* bezier_button;
62  QPushButton* hold_button;
63 private slots:
64  void set_key_button_enabled(bool e, int type);
65  void set_keyframe_type();
66  void set_field_visibility(bool b);
67 };
68 
69 #endif // GRAPHEDITOR_H
void set_keyframe_type()
Definition: grapheditor.cpp:248
Definition: panel.h:26
Definition: grapheditor.h:35
QVector< LabelSlider * > field_sliders_
Definition: grapheditor.h:55
QPushButton * linear_button
Definition: grapheditor.h:60
void set_field_visibility(bool b)
Definition: grapheditor.cpp:255
bool view_is_focused()
Definition: grapheditor.cpp:223
EffectRow * get_row()
Definition: grapheditor.cpp:134
QLabel * current_row_desc
Definition: grapheditor.h:57
bool view_is_under_mouse()
Definition: grapheditor.cpp:227
QVector< QPushButton * > field_enable_buttons
Definition: grapheditor.h:56
QPushButton * hold_button
Definition: grapheditor.h:62
KeyframeNavigator * keyframe_nav
Definition: grapheditor.h:59
GraphView * view
Definition: grapheditor.h:52
void set_row(EffectRow *r)
Definition: grapheditor.cpp:164
virtual void Retranslate() override
Definition: grapheditor.cpp:139
void select_all()
Definition: grapheditor.cpp:235
QHBoxLayout * value_layout
Definition: grapheditor.h:54
Definition: keyframenavigator.h:29
Definition: graphview.h:32
GraphEditor(QWidget *parent=nullptr)
Definition: grapheditor.cpp:42
EffectRow * row
Definition: grapheditor.h:58
TimelineHeader * header
Definition: grapheditor.h:53
void delete_selected_keys()
Definition: grapheditor.cpp:231
QPushButton * bezier_button
Definition: grapheditor.h:61
void set_key_button_enabled(bool e, int type)
Definition: grapheditor.cpp:239
Definition: timelineheader.h:31
The EffectRow class.
Definition: effectrow.h:51
void update_panel()
Definition: grapheditor.cpp:146