implemented bulk of curve editor's functionality

While certainly not entirely complete yet, this implements most of the UI
functionality of the graph editor.
This commit is contained in:
itsmattkc
2019-12-28 18:26:37 +11:00
parent b65abe4881
commit 26cafa7936
21 changed files with 603 additions and 36 deletions
+27
View File
@@ -10,10 +10,37 @@ CurvePanel::CurvePanel(QWidget *parent) :
widget_ = new CurveWidget();
setWidget(widget_);
connect(widget_, &CurveWidget::TimeChanged, this, &CurvePanel::TimeChanged);
// Set strings
Retranslate();
}
void CurvePanel::SetInput(NodeInput *input)
{
widget_->SetInput(input);
}
void CurvePanel::SetTimebase(const rational &timebase)
{
widget_->SetTimebase(timebase);
}
void CurvePanel::SetTime(const int64_t &timestamp)
{
widget_->SetTime(timestamp);
}
void CurvePanel::ZoomIn()
{
widget_->SetScale(widget_->GetScale() * 2);
}
void CurvePanel::ZoomOut()
{
widget_->SetScale(widget_->GetScale() * 0.5);
}
void CurvePanel::changeEvent(QEvent *e)
{
if (e->type() == QEvent::LanguageChange) {
+15
View File
@@ -6,9 +6,24 @@
class CurvePanel : public PanelWidget
{
Q_OBJECT
public:
CurvePanel(QWidget* parent);
public slots:
void SetInput(NodeInput* input);
void SetTimebase(const rational& timebase);
void SetTime(const int64_t& timestamp);
virtual void ZoomIn() override;
virtual void ZoomOut() override;
signals:
void TimeChanged(const int64_t& timestamp);
protected:
virtual void changeEvent(QEvent* e) override;
+2
View File
@@ -28,6 +28,8 @@ ParamPanel::ParamPanel(QWidget* parent) :
view_ = new NodeParamView(this);
connect(view_, &NodeParamView::TimeChanged, this, &ParamPanel::TimeChanged);
connect(view_, &NodeParamView::SelectedInputChanged, this, &ParamPanel::SelectedInputChanged);
connect(view_, &NodeParamView::TimebaseChanged, this, &ParamPanel::TimebaseChanged);
setWidget(view_);
+4
View File
@@ -42,6 +42,10 @@ public slots:
signals:
void TimeChanged(const int64_t& timestamp);
void SelectedInputChanged(NodeInput* input);
void TimebaseChanged(const rational& timebase);
protected:
virtual void changeEvent(QEvent* e) override;