MCPcopy Create free account
hub / github.com/DistroAV/DistroAV / showEvent

Method showEvent

src/forms/output-settings.cpp:332–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332void OutputSettings::showEvent(QShowEvent *)
333{
334 auto config = Config::Current();
335
336 // Enable Output (Main & Preview) settings as long as Main Output can be supported.
337
338 if (main_output_is_supported()) {
339 ui->mainOutputGroupBox->setEnabled(true);
340 ui->previewOutputGroupBox->setEnabled(true);
341 } else {
342 ui->mainOutputGroupBox->setEnabled(false);
343 ui->previewOutputGroupBox->setEnabled(false);
344 }
345
346 ui->mainOutputGroupBox->setChecked(config->OutputEnabled);
347 ui->mainOutputName->setText(config->OutputName);
348 ui->mainOutputGroups->setText(config->OutputGroups);
349
350 auto lastError = main_output_last_error();
351 ui->mainOutputLastError->setText(lastError);
352 if (lastError.isEmpty()) {
353 ui->mainOutputLastError->setFixedHeight(0); // don't waste dialog space if error is no longer valid.
354 } else {
355 ui->mainOutputLastError->setFixedHeight(ui->mainOutputLastError->sizeHint().height());
356 }
357
358 ui->previewOutputGroupBox->setChecked(config->PreviewOutputEnabled);
359 ui->previewOutputName->setText(config->PreviewOutputName);
360 ui->previewOutputGroups->setText(config->PreviewOutputGroups);
361
362 ui->tallyProgramCheckBox->setChecked(config->TallyProgramEnabled);
363 ui->tallyPreviewCheckBox->setChecked(config->TallyPreviewEnabled);
364
365 ui->checkBoxAutoCheckForUpdates->setChecked(config->AutoCheckForUpdates());
366}
367
368void OutputSettings::toggleShowHide()
369{

Callers

nothing calls this directly

Calls 3

main_output_is_supportedFunction · 0.85
main_output_last_errorFunction · 0.85
AutoCheckForUpdatesMethod · 0.80

Tested by

no test coverage detected