Meshroom/meshroom/ui/qml/DialogsFactory.qml
luz paz f4dcf6557f Fix various typos in the source code
## Description
Fix various typos in the source code. This includes user facing code, documentation, and source comments. This PR has not been tested.
Closes #1605
2022-01-22 07:39:05 -05:00

47 lines
1 KiB
QML

import QtQuick 2.9
import MaterialIcons 2.2
import Controls 1.0
/**
* DialogsFactory is utility object to instantiate generic purpose Dialogs.
*/
QtObject {
readonly property string defaultErrorText: "An unexpected error has occurred"
property Component infoDialog: Component {
MessageDialog {
title: "Info"
preset: "Info"
visible: true
}
}
property Component warningDialog: Component {
MessageDialog {
title: "Warning"
preset: "Warning"
visible: true
}
}
property Component errorDialog: Component {
id: errorDialog
MessageDialog {
title: "Error"
preset: "Error"
text: defaultErrorText
visible: true
}
}
function info(window) {
return infoDialog.createObject(window)
}
function warning(window) {
return warningDialog.createObject(window)
}
function error(window) {
return errorDialog.createObject(window)
}
}