+void BrowserWindow::getZoomFactorFromUser()
+{
+ // Create an OK flag.
+ bool okClicked;
+
+ // Display a dialog to get the new zoom factor from the user. Format the double to display two decimals and have a 0.25 step.
+ double newZoomFactor = QInputDialog::getDouble(this, i18nc("The tile of the on-the-fly zoom factor dialog", "On-The-Fly Zoom Factor"),
+ i18nc("The instruction text of the on-the-fly zoom factor dialog", "Enter a zoom factor between 0.25 and 5.00"),
+ currentZoomFactor, .025, 5.00, 2, &okClicked, Qt::WindowFlags(), 0.25);
+
+ if (okClicked)
+ {
+ // Update the current zoom factor.
+ currentZoomFactor = newZoomFactor;
+
+ // Set the new zoom factor.
+ mainViewPointer->applyOnTheFlyZoomFactor(newZoomFactor);
+
+ // Update the on-the-fly action text.
+ updateOnTheFlyZoomFactor(newZoomFactor);
+ }
+}
+