+ Q_EMIT domainSettingsUpdated();
+ }
+}
+
+void DomainSettingsDialog::showDeleteAllMessageBox() const
+{
+ // Instantiate a delete all message box.
+ QMessageBox deleteAllMessageBox;
+
+ // Set the icon.
+ deleteAllMessageBox.setIcon(QMessageBox::Warning);
+
+ // Set the window title.
+ deleteAllMessageBox.setWindowTitle(i18nc("Delete all domains dialog title", "Delete All Domains"));
+
+ // Set the text.
+ deleteAllMessageBox.setText(i18nc("Delete all domains dialog main message", "Delete all domains?"));
+
+ // Set the informative test.
+ deleteAllMessageBox.setInformativeText(i18nc("Delete all domains dialog secondary message", "This action cannot be undone."));
+
+ // Set the standard buttons.
+ deleteAllMessageBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
+
+ // Set the default button.
+ deleteAllMessageBox.setDefaultButton(QMessageBox::No);
+
+ // Display the dialog and capture the return value.
+ int returnValue = deleteAllMessageBox.exec();
+
+ // Delete all domains if instructed.
+ if (returnValue == QMessageBox::Yes)
+ {
+ // Get the count of all rows.
+ int rowCount = domainsTableModelPointer->rowCount();
+
+ // Delete all the rows, starting with 0.
+ domainsTableModelPointer->removeRows(0, rowCount);
+
+ // Submit all pending changes.
+ domainsTableModelPointer->submitAll();
+
+ // Update the buttons.
+ updateButtons();
+
+ // Emit the domain settings updated signal.
+ Q_EMIT domainSettingsUpdated();