- connect(new QShortcut(QKeySequence::MoveToNextPage, this), &QShortcut::activated, switch_page);
- connect(new QShortcut(QKeySequence::MoveToPreviousPage, this), &QShortcut::activated, switch_page);
+ auto next_page = [this]{
+ if (global_audio_mixer->get_mapping_mode() == AudioMixer::MappingMode::MULTICHANNEL) {
+ ui->audio_views->setCurrentIndex((ui->audio_views->currentIndex() + 1) % 3);
+ } else {
+ ui->audio_views->setCurrentIndex(2 - ui->audio_views->currentIndex()); // Switch between 0 and 2.
+ }
+ };
+ connect(ui->compact_prev_page, &QAbstractButton::clicked, prev_page);
+ connect(ui->compact_next_page, &QAbstractButton::clicked, next_page);
+ connect(ui->full_prev_page, &QAbstractButton::clicked, prev_page);
+ connect(ui->full_next_page, &QAbstractButton::clicked, next_page);
+ connect(ui->video_grid_prev_page, &QAbstractButton::clicked, prev_page);
+ connect(ui->video_grid_next_page, &QAbstractButton::clicked, next_page);
+
+ // And bind the same to PgUp/PgDown.
+ connect(new QShortcut(QKeySequence::MoveToNextPage, this), &QShortcut::activated, next_page);
+ connect(new QShortcut(QKeySequence::MoveToPreviousPage, this), &QShortcut::activated, prev_page);
+
+ // When the audio view changes, move the previews.
+ connect(ui->audio_views, &QStackedWidget::currentChanged, bind(&MainWindow::audio_view_changed, this, _1));
+
+ if (global_flags.enable_quick_cut_keys) {
+ ui->quick_cut_enable_action->setChecked(true);
+ }
+ connect(ui->quick_cut_enable_action, &QAction::changed, [this](){
+ global_flags.enable_quick_cut_keys = ui->quick_cut_enable_action->isChecked();
+ });