status-desktop/ui/app/AppLayouts/Profile/Sections/BrowserModals/SearchEngineModal.qml

72 lines
1.9 KiB
QML

import QtQuick 2.13
import QtQuick.Controls 2.13
import "../../../../../imports"
import "../../../../../shared"
import "../../../../../shared/status"
ModalPopup {
id: popup
title: qsTr("Search engine")
onClosed: {
destroy()
}
Column {
spacing: Style.current.bigPadding
width: parent.width
ButtonGroup {
id: searchEnginGroup
}
StatusRadioButton {
text: qsTr("None")
ButtonGroup.group: searchEnginGroup
checked: appSettings.browserSearchEngine === Constants.browserSearchEngineNone
onCheckedChanged: {
if (checked) {
appSettings.browserSearchEngine = Constants.browserSearchEngineNone
}
}
}
StatusRadioButton {
text: "Google"
ButtonGroup.group: searchEnginGroup
checked: appSettings.browserSearchEngine === Constants.browserSearchEngineGoogle
onCheckedChanged: {
if (checked) {
appSettings.browserSearchEngine = Constants.browserSearchEngineGoogle
}
}
}
StatusRadioButton {
text: "Yahoo!"
ButtonGroup.group: searchEnginGroup
checked: appSettings.browserSearchEngine === Constants.browserSearchEngineYahoo
onCheckedChanged: {
if (checked) {
appSettings.browserSearchEngine = Constants.browserSearchEngineYahoo
}
}
}
StatusRadioButton {
text: "DuckDuckGo"
ButtonGroup.group: searchEnginGroup
checked: appSettings.browserSearchEngine === Constants.browserSearchEngineDuckDuckGo
onCheckedChanged: {
if (checked) {
appSettings.browserSearchEngine = Constants.browserSearchEngineDuckDuckGo
}
}
}
}
}