| 520 | } |
| 521 | |
| 522 | void 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 | |
| 543 | void OptionsDialog::flipToggled(bool checked) |
| 544 | { |