// Make the previews.
unsigned num_previews = mixer->get_num_channels();
+ const char qwerty[] = "QWERTYUIOP";
for (unsigned i = 0; i < num_previews; ++i) {
Mixer::Output output = Mixer::Output(Mixer::OUTPUT_INPUT0 + i);
QShortcut *shortcut = new QShortcut(QKeySequence(Qt::Key_1 + i), this);
connect(shortcut, &QShortcut::activated, bind(&MainWindow::channel_clicked, this, i));
+ // Hook up the quick-cut key.
+ if (i < strlen(qwerty)) {
+ QShortcut *shortcut = new QShortcut(QKeySequence(qwerty[i]), this);
+ connect(shortcut, &QShortcut::activated, bind(&MainWindow::quick_cut_activated, this, i));
+ }
+
// Hook up the white balance button (irrelevant if invisible).
ui_display->wb_button->setVisible(mixer->get_supports_set_wb(output));
connect(ui_display->wb_button, &QPushButton::clicked, bind(&MainWindow::wb_button_clicked, this, i));
}
}
+void MainWindow::quick_cut_activated(int channel_number)
+{
+ global_mixer->channel_clicked(channel_number);
+ global_mixer->transition_clicked(0);
+}
+
void MainWindow::wb_button_clicked(int channel_number)
{
current_wb_pick_display = channel_number;