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:
@@ -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 ×tamp)
|
||||
{
|
||||
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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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_);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user