fix connections for new tracktype namespace
This commit is contained in:
@@ -43,13 +43,13 @@ ViewerOutput::ViewerOutput()
|
||||
|
||||
TrackList* list = new TrackList(this, static_cast<Timeline::TrackType>(i), track_input);
|
||||
track_lists_.replace(i, list);
|
||||
connect(list, SIGNAL(TrackListChanged()), this, SLOT(UpdateTrackCache()));
|
||||
connect(list, SIGNAL(LengthChanged(const rational &)), this, SLOT(UpdateLength(const rational &)));
|
||||
connect(list, SIGNAL(BlockAdded(Block*, int)), this, SLOT(TrackListAddedBlock(Block*, int)));
|
||||
connect(list, SIGNAL(BlockRemoved(Block*)), this, SIGNAL(BlockRemoved(Block*)));
|
||||
connect(list, SIGNAL(TrackAdded(TrackOutput*)), this, SLOT(TrackListAddedTrack(TrackOutput*)));
|
||||
connect(list, SIGNAL(TrackRemoved(TrackOutput*)), this, SIGNAL(TrackRemoved(TrackOutput*)));
|
||||
connect(list, SIGNAL(TrackHeightChanged(int, int)), this, SLOT(TrackHeightChangedSlot(int, int)));
|
||||
connect(list, &TrackList::TrackListChanged, this, &ViewerOutput::UpdateTrackCache);
|
||||
connect(list, &TrackList::LengthChanged, this, &ViewerOutput::UpdateLength);
|
||||
connect(list, &TrackList::BlockAdded, this, &ViewerOutput::TrackListAddedBlock);
|
||||
connect(list, &TrackList::BlockRemoved, this, &ViewerOutput::BlockRemoved);
|
||||
connect(list, &TrackList::TrackAdded, this, &ViewerOutput::TrackListAddedTrack);
|
||||
connect(list, &TrackList::TrackRemoved, this, &ViewerOutput::TrackRemoved);
|
||||
connect(list, &TrackList::TrackHeightChanged, this, &ViewerOutput::TrackHeightChangedSlot);
|
||||
}
|
||||
|
||||
// Create UUID for this node
|
||||
|
||||
@@ -184,13 +184,13 @@ void TimelineWidget::SetTime(int64_t timestamp)
|
||||
void TimelineWidget::ConnectTimelineNode(ViewerOutput *node)
|
||||
{
|
||||
if (timeline_node_ != nullptr) {
|
||||
disconnect(timeline_node_, SIGNAL(LengthChanged(const rational&)), this, SLOT(UpdateTimelineLength(const rational&)));
|
||||
disconnect(timeline_node_, SIGNAL(BlockAdded(Block*, TrackReference)), this, SLOT(AddBlock(Block*, TrackReference)));
|
||||
disconnect(timeline_node_, SIGNAL(BlockRemoved(Block*)), this, SLOT(RemoveBlock(Block*)));
|
||||
disconnect(timeline_node_, SIGNAL(TrackAdded(TrackOutput*, TrackType)), this, SLOT(AddTrack(TrackOutput*, TrackType)));
|
||||
disconnect(timeline_node_, SIGNAL(TrackRemoved(TrackOutput*)), this, SLOT(RemoveTrack(TrackOutput*)));
|
||||
disconnect(timeline_node_, SIGNAL(TimebaseChanged(const rational&)), this, SLOT(SetTimebase(const rational&)));
|
||||
disconnect(timeline_node_, SIGNAL(TrackHeightChanged(TrackType, int, int)), this, SLOT(TrackHeightChanged(TrackType, int, int)));
|
||||
disconnect(timeline_node_, &ViewerOutput::LengthChanged, this, &TimelineWidget::UpdateTimelineLength);
|
||||
disconnect(timeline_node_, &ViewerOutput::BlockAdded, this, &TimelineWidget::AddBlock);
|
||||
disconnect(timeline_node_, &ViewerOutput::BlockRemoved, this, &TimelineWidget::RemoveBlock);
|
||||
disconnect(timeline_node_, &ViewerOutput::TrackAdded, this, &TimelineWidget::AddTrack);
|
||||
disconnect(timeline_node_, &ViewerOutput::TrackRemoved, this, &TimelineWidget::RemoveTrack);
|
||||
disconnect(timeline_node_, &ViewerOutput::TimebaseChanged, this, &TimelineWidget::SetTimebase);
|
||||
disconnect(timeline_node_, &ViewerOutput::TrackHeightChanged, this, &TimelineWidget::TrackHeightChanged);
|
||||
|
||||
SetTimebase(0);
|
||||
|
||||
@@ -205,13 +205,13 @@ void TimelineWidget::ConnectTimelineNode(ViewerOutput *node)
|
||||
timeline_node_ = node;
|
||||
|
||||
if (timeline_node_ != nullptr) {
|
||||
connect(timeline_node_, SIGNAL(LengthChanged(const rational&)), this, SLOT(UpdateTimelineLength(const rational&)));
|
||||
connect(timeline_node_, SIGNAL(BlockAdded(Block*, TrackReference)), this, SLOT(AddBlock(Block*, TrackReference)));
|
||||
connect(timeline_node_, SIGNAL(BlockRemoved(Block*)), this, SLOT(RemoveBlock(Block*)));
|
||||
connect(timeline_node_, SIGNAL(TrackAdded(TrackOutput*, TrackType)), this, SLOT(AddTrack(TrackOutput*, TrackType)));
|
||||
connect(timeline_node_, SIGNAL(TrackRemoved(TrackOutput*)), this, SLOT(RemoveTrack(TrackOutput*)));
|
||||
connect(timeline_node_, SIGNAL(TimebaseChanged(const rational&)), this, SLOT(SetTimebase(const rational&)));
|
||||
connect(timeline_node_, SIGNAL(TrackHeightChanged(TrackType, int, int)), this, SLOT(TrackHeightChanged(TrackType, int, int)));
|
||||
connect(timeline_node_, &ViewerOutput::LengthChanged, this, &TimelineWidget::UpdateTimelineLength);
|
||||
connect(timeline_node_, &ViewerOutput::BlockAdded, this, &TimelineWidget::AddBlock);
|
||||
connect(timeline_node_, &ViewerOutput::BlockRemoved, this, &TimelineWidget::RemoveBlock);
|
||||
connect(timeline_node_, &ViewerOutput::TrackAdded, this, &TimelineWidget::AddTrack);
|
||||
connect(timeline_node_, &ViewerOutput::TrackRemoved, this, &TimelineWidget::RemoveTrack);
|
||||
connect(timeline_node_, &ViewerOutput::TimebaseChanged, this, &TimelineWidget::SetTimebase);
|
||||
connect(timeline_node_, &ViewerOutput::TrackHeightChanged, this, &TimelineWidget::TrackHeightChanged);
|
||||
|
||||
SetTimebase(timeline_node_->video_params().time_base());
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ TrackView::TrackView(Qt::Alignment vertical_alignment, QWidget *parent) :
|
||||
if (alignment_ == Qt::AlignBottom) {
|
||||
layout->addStretch();
|
||||
|
||||
connect(verticalScrollBar(), SIGNAL(rangeChanged(int, int)), this, SLOT(ScrollbarRangeChanged(int, int)));
|
||||
connect(verticalScrollBar(), &QScrollBar::rangeChanged, this, &TrackView::ScrollbarRangeChanged);
|
||||
last_scrollbar_max_ = verticalScrollBar()->maximum();
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ TrackView::TrackView(Qt::Alignment vertical_alignment, QWidget *parent) :
|
||||
layout->addStretch();
|
||||
}
|
||||
|
||||
connect(splitter_, SIGNAL(TrackHeightChanged(int, int)), this, SLOT(TrackHeightChanged(int, int)));
|
||||
connect(splitter_, &TrackViewSplitter::TrackHeightChanged, this, &TrackView::TrackHeightChanged);
|
||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
}
|
||||
@@ -51,9 +51,9 @@ void TrackView::ConnectTrackList(TrackList *list)
|
||||
}
|
||||
items_.clear();
|
||||
|
||||
disconnect(list_, SIGNAL(TrackHeightChanged(int, int)), splitter_, SLOT(SetTrackHeight(int, int)));
|
||||
disconnect(list_, SIGNAL(TrackAdded(TrackOutput*)), this, SLOT(InsertTrack(TrackOutput*)));
|
||||
disconnect(list_, SIGNAL(TrackRemoved(TrackOutput*)), this, SLOT(RemoveTrack(TrackOutput*)));
|
||||
disconnect(list_, &TrackList::TrackHeightChanged, splitter_, &TrackViewSplitter::SetTrackHeight);
|
||||
disconnect(list_, &TrackList::TrackAdded, this, &TrackView::InsertTrack);
|
||||
disconnect(list_, &TrackList::TrackRemoved, this, &TrackView::RemoveTrack);
|
||||
}
|
||||
|
||||
list_ = list;
|
||||
@@ -65,9 +65,9 @@ void TrackView::ConnectTrackList(TrackList *list)
|
||||
splitter_->Insert(track->Index(), track->GetTrackHeight(), item);
|
||||
}
|
||||
|
||||
connect(list_, SIGNAL(TrackHeightChanged(int, int)), splitter_, SLOT(SetTrackHeight(int, int)));
|
||||
connect(list_, SIGNAL(TrackAdded(TrackOutput*)), this, SLOT(InsertTrack(TrackOutput*)));
|
||||
connect(list_, SIGNAL(TrackRemoved(TrackOutput*)), this, SLOT(RemoveTrack(TrackOutput*)));
|
||||
connect(list_, &TrackList::TrackHeightChanged, splitter_, &TrackViewSplitter::SetTrackHeight);
|
||||
connect(list_, &TrackList::TrackAdded, this, &TrackView::InsertTrack);
|
||||
connect(list_, &TrackList::TrackRemoved, this, &TrackView::RemoveTrack);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,28 +51,28 @@ ViewerWidget::ViewerWidget(QWidget *parent) :
|
||||
// Create time ruler
|
||||
ruler_ = new TimeRuler(false, true);
|
||||
layout->addWidget(ruler_);
|
||||
connect(ruler_, SIGNAL(TimeChanged(int64_t)), this, SLOT(RulerTimeChange(int64_t)));
|
||||
connect(ruler_, &TimeRuler::TimeChanged, this, &ViewerWidget::RulerTimeChange);
|
||||
|
||||
// Create scrollbar
|
||||
scrollbar_ = new QScrollBar(Qt::Horizontal);
|
||||
layout->addWidget(scrollbar_);
|
||||
connect(scrollbar_, SIGNAL(valueChanged(int)), ruler_, SLOT(SetScroll(int)));
|
||||
connect(scrollbar_, &QScrollBar::valueChanged, ruler_, &TimeRuler::SetScroll);
|
||||
scrollbar_->setPageStep(ruler_->width());
|
||||
|
||||
// Create lower controls
|
||||
controls_ = new PlaybackControls();
|
||||
controls_->SetTimecodeEnabled(true);
|
||||
controls_->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
|
||||
connect(controls_, SIGNAL(PlayClicked()), this, SLOT(Play()));
|
||||
connect(controls_, SIGNAL(PauseClicked()), this, SLOT(Pause()));
|
||||
connect(controls_, SIGNAL(PrevFrameClicked()), this, SLOT(PrevFrame()));
|
||||
connect(controls_, SIGNAL(NextFrameClicked()), this, SLOT(NextFrame()));
|
||||
connect(controls_, SIGNAL(BeginClicked()), this, SLOT(GoToStart()));
|
||||
connect(controls_, SIGNAL(EndClicked()), this, SLOT(GoToEnd()));
|
||||
connect(controls_, &PlaybackControls::PlayClicked, this, &ViewerWidget::Play);
|
||||
connect(controls_, &PlaybackControls::PauseClicked, this, &ViewerWidget::Pause);
|
||||
connect(controls_, &PlaybackControls::PrevFrameClicked, this, &ViewerWidget::PrevFrame);
|
||||
connect(controls_, &PlaybackControls::NextFrameClicked, this, &ViewerWidget::NextFrame);
|
||||
connect(controls_, &PlaybackControls::BeginClicked, this, &ViewerWidget::GoToStart);
|
||||
connect(controls_, &PlaybackControls::EndClicked, this, &ViewerWidget::GoToEnd);
|
||||
layout->addWidget(controls_);
|
||||
|
||||
// Connect timer
|
||||
connect(&playback_timer_, SIGNAL(timeout()), this, SLOT(PlaybackTimerUpdate()));
|
||||
connect(&playback_timer_, &QTimer::timeout, this, &ViewerWidget::PlaybackTimerUpdate);
|
||||
|
||||
// FIXME: Magic number
|
||||
ruler_->SetScale(48.0);
|
||||
|
||||
Reference in New Issue
Block a user