MCPcopy Create free account
hub / github.com/ckaiser/Lightscreen / restoreDefaults

Method restoreDefaults

dialogs/optionsdialog.cpp:522–541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

520}
521
522void OptionsDialog::restoreDefaults()
523{
524 QMessageBox msgBox;
525 msgBox.setWindowTitle(tr("Lightscreen - Restore Default Options"));
526 msgBox.setText(tr("Restoring the default options will cause you to lose all of your current configuration."));
527 msgBox.setIcon(QMessageBox::Warning);
528
529 msgBox.addButton(tr("Restore"), QMessageBox::ActionRole);
530 QPushButton *dontRestoreButton = msgBox.addButton(tr("Don't Restore"), QMessageBox::ActionRole);
531
532 msgBox.setDefaultButton(dontRestoreButton);
533 msgBox.exec();
534
535 if (msgBox.clickedButton() == dontRestoreButton) {
536 return;
537 }
538
539 settings()->clear();
540 loadSettings();
541}
542
543void OptionsDialog::flipToggled(bool checked)
544{

Callers

nothing calls this directly

Calls 1

clearMethod · 0.80

Tested by

no test coverage detected