removed speed/duration dialog
This is the first step in what will eventually be keyframable time remapping. The speed/duration dialog was a holdover from 0.1 and we can probably do better here.
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
#include "common/range.h"
|
||||
#include "common/timecodefunctions.h"
|
||||
#include "dialog/sequence/sequence.h"
|
||||
#include "dialog/speedduration/speedduration.h"
|
||||
#include "node/block/transition/transition.h"
|
||||
#include "tool/tool.h"
|
||||
#include "trackview/trackview.h"
|
||||
@@ -1070,11 +1069,6 @@ void TimelineWidget::ShowContextMenu()
|
||||
|
||||
menu.addSeparator();
|
||||
|
||||
QAction* speed_duration_action = menu.addAction(tr("Speed/Duration"));
|
||||
connect(speed_duration_action, &QAction::triggered, this, &TimelineWidget::ShowSpeedDurationDialog);
|
||||
|
||||
menu.addSeparator();
|
||||
|
||||
QAction* properties_action = menu.addAction(tr("Properties"));
|
||||
connect(properties_action, &QAction::triggered, this, [this](){
|
||||
QList<TimelineViewBlockItem*> block_items = GetSelectedBlocks();
|
||||
@@ -1104,26 +1098,6 @@ void TimelineWidget::ShowContextMenu()
|
||||
menu.exec(QCursor::pos());
|
||||
}
|
||||
|
||||
void TimelineWidget::ShowSpeedDurationDialog()
|
||||
{
|
||||
QList<TimelineViewBlockItem*> selected = GetSelectedBlocks();
|
||||
QList<ClipBlock*> selected_clips;
|
||||
|
||||
foreach (TimelineViewBlockItem* item, selected) {
|
||||
if (item->block()->type() == Block::kClip) {
|
||||
selected_clips.append(static_cast<ClipBlock*>(item->block()));
|
||||
}
|
||||
}
|
||||
|
||||
if (selected_clips.isEmpty()) {
|
||||
// SpeedDurationDialog expects at least one clip
|
||||
return;
|
||||
}
|
||||
|
||||
SpeedDurationDialog speed_diag(timebase(), selected_clips, this);
|
||||
speed_diag.exec();
|
||||
}
|
||||
|
||||
void TimelineWidget::DeferredScrollAction()
|
||||
{
|
||||
scrollbar()->setValue(deferred_scroll_value_);
|
||||
|
||||
@@ -558,8 +558,6 @@ private slots:
|
||||
|
||||
void ShowContextMenu();
|
||||
|
||||
void ShowSpeedDurationDialog();
|
||||
|
||||
void DeferredScrollAction();
|
||||
|
||||
void ShowSequenceDialog();
|
||||
|
||||
@@ -596,29 +596,6 @@ Project *BlockSplitPreservingLinksCommand::GetRelevantProject() const
|
||||
return static_cast<Sequence*>(blocks_.first()->parent())->project();
|
||||
}
|
||||
|
||||
BlockSetSpeedCommand::BlockSetSpeedCommand(Block *block, const rational &new_speed, QUndoCommand *parent) :
|
||||
UndoCommand(parent),
|
||||
block_(block),
|
||||
old_speed_(block->speed()),
|
||||
new_speed_(new_speed)
|
||||
{
|
||||
}
|
||||
|
||||
Project *BlockSetSpeedCommand::GetRelevantProject() const
|
||||
{
|
||||
return static_cast<Sequence*>(block_->parent())->project();
|
||||
}
|
||||
|
||||
void BlockSetSpeedCommand::redo_internal()
|
||||
{
|
||||
block_->set_speed(new_speed_);
|
||||
}
|
||||
|
||||
void BlockSetSpeedCommand::undo_internal()
|
||||
{
|
||||
block_->set_speed(old_speed_);
|
||||
}
|
||||
|
||||
TimelineRippleDeleteGapsAtRegionsCommand::TimelineRippleDeleteGapsAtRegionsCommand(ViewerOutput *vo, const TimeRangeList ®ions, QUndoCommand *parent) :
|
||||
UndoCommand(parent),
|
||||
timeline_(vo),
|
||||
|
||||
@@ -113,23 +113,6 @@ private:
|
||||
rational new_media_in_;
|
||||
};
|
||||
|
||||
class BlockSetSpeedCommand : public UndoCommand {
|
||||
public:
|
||||
BlockSetSpeedCommand(Block* block, const rational& new_speed, QUndoCommand* parent = nullptr);
|
||||
|
||||
virtual Project* GetRelevantProject() const override;
|
||||
|
||||
protected:
|
||||
virtual void redo_internal() override;
|
||||
virtual void undo_internal() override;
|
||||
|
||||
private:
|
||||
Block* block_;
|
||||
|
||||
rational old_speed_;
|
||||
rational new_speed_;
|
||||
};
|
||||
|
||||
class TrackRippleRemoveBlockCommand : public UndoCommand {
|
||||
public:
|
||||
TrackRippleRemoveBlockCommand(TrackOutput* track, Block* block, QUndoCommand* parent = nullptr);
|
||||
|
||||
Reference in New Issue
Block a user