@@ -38,6 +38,22 @@ FootageViewerWidget::FootageViewerWidget(QWidget *parent) :
|
||||
controls_->SetAudioVideoDragButtonsVisible(true);
|
||||
connect(controls_, &PlaybackControls::VideoPressed, this, &FootageViewerWidget::StartVideoDrag);
|
||||
connect(controls_, &PlaybackControls::AudioPressed, this, &FootageViewerWidget::StartAudioDrag);
|
||||
|
||||
override_workarea_ = new TimelineWorkArea(this);
|
||||
}
|
||||
|
||||
void FootageViewerWidget::OverrideWorkArea(const TimeRange &r)
|
||||
{
|
||||
override_workarea_->set_enabled(true);
|
||||
override_workarea_->set_range(r);
|
||||
this->ConnectWorkArea(override_workarea_);
|
||||
}
|
||||
|
||||
void FootageViewerWidget::ResetWorkArea()
|
||||
{
|
||||
if (GetConnectedWorkArea() == override_workarea_) {
|
||||
this->ConnectWorkArea(GetConnectedNode() ? GetConnectedNode()->GetWorkArea() : nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void FootageViewerWidget::ConnectNodeEvent(ViewerOutput *n)
|
||||
|
||||
@@ -32,6 +32,9 @@ class FootageViewerWidget : public ViewerWidget
|
||||
public:
|
||||
FootageViewerWidget(QWidget* parent = nullptr);
|
||||
|
||||
void OverrideWorkArea(const TimeRange &r);
|
||||
void ResetWorkArea();
|
||||
|
||||
protected:
|
||||
virtual void ConnectNodeEvent(ViewerOutput *) override;
|
||||
|
||||
@@ -42,6 +45,8 @@ private:
|
||||
|
||||
QHash<ViewerOutput*, rational> cached_timestamps_;
|
||||
|
||||
TimelineWorkArea *override_workarea_;
|
||||
|
||||
private slots:
|
||||
void StartFootageDrag();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user