mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-02 09:40:42 +00:00
dedup qml: move accessible properties to MyButton
This commit is contained in:
parent
d22f9242d7
commit
fc76760f7a
@ -234,12 +234,10 @@ Dialog {
|
|||||||
text: "Remove"
|
text: "Remove"
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 20
|
anchors.rightMargin: 20
|
||||||
|
Accessible.description: qsTr("Remove button to remove model from filesystem")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Download.removeModel(modelData.filename);
|
Download.removeModel(modelData.filename);
|
||||||
}
|
}
|
||||||
Accessible.role: Accessible.Button
|
|
||||||
Accessible.name: qsTr("Remove button")
|
|
||||||
Accessible.description: qsTr("Remove button to remove model from filesystem")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -298,6 +296,7 @@ Dialog {
|
|||||||
anchors.topMargin: 15
|
anchors.topMargin: 15
|
||||||
anchors.rightMargin: 20
|
anchors.rightMargin: 20
|
||||||
visible: !modelData.isChatGPT && !modelData.installed && !modelData.calcHash
|
visible: !modelData.isChatGPT && !modelData.installed && !modelData.calcHash
|
||||||
|
Accessible.description: qsTr("Cancel/Download button to stop/start the download")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (!downloading) {
|
if (!downloading) {
|
||||||
downloading = true;
|
downloading = true;
|
||||||
@ -307,9 +306,6 @@ Dialog {
|
|||||||
Download.cancelDownload(modelData.filename);
|
Download.cancelDownload(modelData.filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Accessible.role: Accessible.Button
|
|
||||||
Accessible.name: text
|
|
||||||
Accessible.description: qsTr("Cancel/Download button to stop/start the download")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -420,8 +416,6 @@ Dialog {
|
|||||||
}
|
}
|
||||||
MyButton {
|
MyButton {
|
||||||
text: qsTr("Browse")
|
text: qsTr("Browse")
|
||||||
Accessible.role: Accessible.Button
|
|
||||||
Accessible.name: text
|
|
||||||
Accessible.description: qsTr("Opens a folder picker dialog to choose where to save model files")
|
Accessible.description: qsTr("Opens a folder picker dialog to choose where to save model files")
|
||||||
onClicked: modelPathDialog.open()
|
onClicked: modelPathDialog.open()
|
||||||
}
|
}
|
||||||
|
@ -20,4 +20,6 @@ Button {
|
|||||||
radius: 10
|
radius: 10
|
||||||
color: theme.backgroundLight
|
color: theme.backgroundLight
|
||||||
}
|
}
|
||||||
|
Accessible.role: Accessible.Button
|
||||||
|
Accessible.name: text
|
||||||
}
|
}
|
@ -119,15 +119,11 @@ NOTE: By turning on this feature, you will be sending your data to the GPT4All O
|
|||||||
spacing: 10
|
spacing: 10
|
||||||
MyButton {
|
MyButton {
|
||||||
text: qsTr("Enable")
|
text: qsTr("Enable")
|
||||||
Accessible.role: Accessible.Button
|
|
||||||
Accessible.name: text
|
|
||||||
Accessible.description: qsTr("Enable opt-in button")
|
Accessible.description: qsTr("Enable opt-in button")
|
||||||
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
|
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
|
||||||
}
|
}
|
||||||
MyButton {
|
MyButton {
|
||||||
text: qsTr("Cancel")
|
text: qsTr("Cancel")
|
||||||
Accessible.role: Accessible.Button
|
|
||||||
Accessible.name: text
|
|
||||||
Accessible.description: qsTr("Cancel opt-in button")
|
Accessible.description: qsTr("Cancel opt-in button")
|
||||||
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
|
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,7 @@ Dialog {
|
|||||||
anchors.verticalCenter: label.verticalCenter
|
anchors.verticalCenter: label.verticalCenter
|
||||||
padding: 20
|
padding: 20
|
||||||
text: qsTr("Update")
|
text: qsTr("Update")
|
||||||
|
Accessible.description: qsTr("Update to new version")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (!LLM.checkForUpdates())
|
if (!LLM.checkForUpdates())
|
||||||
checkForUpdatesError.open()
|
checkForUpdatesError.open()
|
||||||
|
@ -530,8 +530,6 @@ Dialog {
|
|||||||
Layout.column: 1
|
Layout.column: 1
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("Restore Defaults")
|
text: qsTr("Restore Defaults")
|
||||||
Accessible.role: Accessible.Button
|
|
||||||
Accessible.name: text
|
|
||||||
Accessible.description: qsTr("Restores the settings dialog to a default state")
|
Accessible.description: qsTr("Restores the settings dialog to a default state")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
settingsDialog.restoreGenerationDefaults()
|
settingsDialog.restoreGenerationDefaults()
|
||||||
@ -646,8 +644,6 @@ Dialog {
|
|||||||
Layout.row: 2
|
Layout.row: 2
|
||||||
Layout.column: 2
|
Layout.column: 2
|
||||||
text: qsTr("Browse")
|
text: qsTr("Browse")
|
||||||
Accessible.role: Accessible.Button
|
|
||||||
Accessible.name: text
|
|
||||||
Accessible.description: qsTr("Opens a folder picker dialog to choose where to save model files")
|
Accessible.description: qsTr("Opens a folder picker dialog to choose where to save model files")
|
||||||
onClicked: modelPathDialog.open()
|
onClicked: modelPathDialog.open()
|
||||||
}
|
}
|
||||||
@ -747,8 +743,6 @@ Dialog {
|
|||||||
Layout.column: 1
|
Layout.column: 1
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("Restore Defaults")
|
text: qsTr("Restore Defaults")
|
||||||
Accessible.role: Accessible.Button
|
|
||||||
Accessible.name: text
|
|
||||||
Accessible.description: qsTr("Restores the settings dialog to a default state")
|
Accessible.description: qsTr("Restores the settings dialog to a default state")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
settingsDialog.restoreApplicationDefaults()
|
settingsDialog.restoreApplicationDefaults()
|
||||||
|
@ -79,15 +79,11 @@ Dialog {
|
|||||||
spacing: 10
|
spacing: 10
|
||||||
MyButton {
|
MyButton {
|
||||||
text: qsTr("Submit")
|
text: qsTr("Submit")
|
||||||
Accessible.role: Accessible.Button
|
|
||||||
Accessible.name: text
|
|
||||||
Accessible.description: qsTr("Submits the user's response")
|
Accessible.description: qsTr("Submits the user's response")
|
||||||
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
|
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
|
||||||
}
|
}
|
||||||
MyButton {
|
MyButton {
|
||||||
text: qsTr("Cancel")
|
text: qsTr("Cancel")
|
||||||
Accessible.role: Accessible.Button
|
|
||||||
Accessible.name: text
|
|
||||||
Accessible.description: qsTr("Closes the response dialog")
|
Accessible.description: qsTr("Closes the response dialog")
|
||||||
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
|
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user