Olive
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 "project/effectrow.h"
34 
35 class GraphEditor : public Panel {
36  Q_OBJECT
37 public:
38  GraphEditor(QWidget* parent = nullptr);
39 
40  void update_panel();
41  void set_row(EffectRow* r);
42  bool view_is_focused();
43  bool view_is_under_mouse();
44  void delete_selected_keys();
45  void select_all();
46 protected:
47  virtual void Retranslate() override;
48 private:
51  QHBoxLayout* value_layout;
52  QVector<LabelSlider*> slider_proxies;
53  QVector<QPushButton*> slider_proxy_buttons;
54  QVector<LabelSlider*> slider_proxy_sources;
58  QPushButton* linear_button;
59  QPushButton* bezier_button;
60  QPushButton* hold_button;
61 private slots:
62  void set_key_button_enabled(bool e, int type);
64  void set_keyframe_type();
65  void set_field_visibility(bool b);
66 };
67 
68 #endif // GRAPHEDITOR_H
Definition: keyframenavigator.h:29
void select_all()
Definition: grapheditor.cpp:230
GraphView * view
Definition: grapheditor.h:49
void set_key_button_enabled(bool e, int type)
Definition: grapheditor.cpp:234
QVector< LabelSlider * > slider_proxies
Definition: grapheditor.h:52
void passthrough_slider_value()
Definition: grapheditor.cpp:243
void delete_selected_keys()
Definition: grapheditor.cpp:226
TimelineHeader * header
Definition: grapheditor.h:50
void update_panel()
Definition: grapheditor.cpp:139
void set_row(EffectRow *r)
Definition: grapheditor.cpp:157
QPushButton * bezier_button
Definition: grapheditor.h:59
QPushButton * linear_button
Definition: grapheditor.h:58
bool view_is_focused()
Definition: grapheditor.cpp:218
Definition: timelineheader.h:31
Definition: effectrow.h:37
QVector< QPushButton * > slider_proxy_buttons
Definition: grapheditor.h:53
Definition: panel.h:26
Definition: graphview.h:32
void set_keyframe_type()
Definition: grapheditor.cpp:251
void set_field_visibility(bool b)
Definition: grapheditor.cpp:258
QHBoxLayout * value_layout
Definition: grapheditor.h:51
bool view_is_under_mouse()
Definition: grapheditor.cpp:222
KeyframeNavigator * keyframe_nav
Definition: grapheditor.h:57
Definition: grapheditor.h:35
virtual void Retranslate() override
Definition: grapheditor.cpp:132
QVector< LabelSlider * > slider_proxy_sources
Definition: grapheditor.h:54
QPushButton * hold_button
Definition: grapheditor.h:60
EffectRow * row
Definition: grapheditor.h:56
GraphEditor(QWidget *parent=nullptr)
Definition: grapheditor.cpp:40
QLabel * current_row_desc
Definition: grapheditor.h:55