transition_btn3 = ui->transition_btn3;
qRegisterMetaType<std::vector<std::string>>("std::vector<std::string>");
connect(ui->me_preview, &GLWidget::transition_names_updated, this, &MainWindow::set_transition_names);
+ qRegisterMetaType<Mixer::Output>("Mixer::Output");
}
void MainWindow::resizeEvent(QResizeEvent* event)
// Hook up the click.
connect(ui_display->display, &GLWidget::clicked, bind(&MainWindow::channel_clicked, this, i));
+ // Let the theme update the text whenever the resolution changed.
+ connect(ui_display->display, &GLWidget::resolution_updated, this, &MainWindow::update_channel_name);
+
// Hook up the keyboard key.
QShortcut *shortcut = new QShortcut(QKeySequence(Qt::Key_1 + i), this);
connect(shortcut, &QShortcut::activated, bind(&MainWindow::channel_clicked, this, i));
ui->compressor_threshold_db_display->setText(buf);
connect(ui->locut_cutoff_knob, &QDial::valueChanged, this, &MainWindow::cutoff_knob_changed);
+ cutoff_knob_changed(ui->locut_cutoff_knob->value());
+
connect(ui->limiter_threshold_knob, &QDial::valueChanged, this, &MainWindow::limiter_threshold_knob_changed);
connect(ui->compressor_threshold_knob, &QDial::valueChanged, this, &MainWindow::compressor_threshold_knob_changed);
connect(ui->limiter_enabled, &QCheckBox::stateChanged, [this](int state){
}
}
+void MainWindow::update_channel_name(Mixer::Output output)
+{
+ if (output >= Mixer::OUTPUT_INPUT0) {
+ unsigned channel = output - Mixer::OUTPUT_INPUT0;
+ previews[channel]->label->setText(global_mixer->get_channel_name(output).c_str());
+ }
+}
+
void MainWindow::transition_clicked(int transition_number)
{
global_mixer->transition_clicked(transition_number);