- auto prev_page = [this]{
- if (global_audio_mixer->get_mapping_mode() == AudioMixer::MappingMode::MULTICHANNEL) {
- ui->audio_views->setCurrentIndex((ui->audio_views->currentIndex() + 2) % 3);
- } else {
- ui->audio_views->setCurrentIndex(2 - ui->audio_views->currentIndex()); // Switch between 0 and 2.
- }
- };
- 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);
+ connect(ui->compact_prev_page, &QAbstractButton::clicked, this, &MainWindow::prev_page);
+ connect(ui->compact_next_page, &QAbstractButton::clicked, this, &MainWindow::next_page);
+ connect(ui->full_prev_page, &QAbstractButton::clicked, this, &MainWindow::prev_page);
+ connect(ui->full_next_page, &QAbstractButton::clicked, this, &MainWindow::next_page);
+ connect(ui->video_grid_prev_page, &QAbstractButton::clicked, this, &MainWindow::prev_page);
+ connect(ui->video_grid_next_page, &QAbstractButton::clicked, this, &MainWindow::next_page);