fort/src/ui/qml/pages/OptionsPage.qml

105 lines
3.0 KiB
QML
Raw Normal View History

2017-09-01 13:13:12 +00:00
import QtQuick 2.9
import QtQuick.Controls 2.2
2017-12-14 08:44:10 +00:00
import QtQuick.Layouts 1.3
import "../controls"
2017-09-02 10:17:51 +00:00
import com.fortfirewall 1.0
2017-09-01 13:13:12 +00:00
2017-09-01 15:13:17 +00:00
BasePage {
2017-09-19 08:35:43 +00:00
function onSaved() { // override
fortSettings.startWithWindows = cbStart.checked;
2017-09-03 06:49:58 +00:00
}
2017-09-06 12:24:03 +00:00
Frame {
2017-09-01 13:13:12 +00:00
anchors.fill: parent
ColumnLayout {
2017-09-06 12:24:03 +00:00
anchors.fill: parent
spacing: 10
CheckBox {
id: cbStart
2017-09-07 10:44:15 +00:00
text: translationManager.dummyBool
&& qsTranslate("qml", "Start with Windows")
2017-09-06 12:24:03 +00:00
checked: fortSettings.startWithWindows
2017-09-07 05:34:18 +00:00
onToggled: {
setConfFlagsEdited();
}
2017-09-06 12:24:03 +00:00
}
2017-12-06 00:27:58 +00:00
CheckBox {
id: cbBoot
text: translationManager.dummyBool
&& qsTranslate("qml", "Block access to network when Fort Firewall is not running")
2017-10-28 01:57:44 +00:00
checked: firewallConf.provBoot
onToggled: {
firewallConf.provBoot = checked;
setConfFlagsEdited();
}
}
2017-12-06 00:27:58 +00:00
2017-09-06 12:24:03 +00:00
CheckBox {
id: cbFilter
2017-09-07 10:44:15 +00:00
text: translationManager.dummyBool
&& qsTranslate("qml", "Filter Enabled")
2017-09-06 12:24:03 +00:00
checked: firewallConf.filterEnabled
onToggled: {
firewallConf.filterEnabled = checked;
2017-09-07 05:34:18 +00:00
setConfFlagsEdited();
2017-09-06 12:24:03 +00:00
}
2017-09-01 13:13:12 +00:00
}
2017-12-06 00:27:58 +00:00
Row {
spacing: 4
Label {
anchors.verticalCenter: parent.verticalCenter
text: translationManager.dummyBool
&& qsTranslate("qml", "Language:")
}
ComboBox {
width: Math.max(implicitWidth, 180)
flat: true
currentIndex: translationManager.language
model: translationManager.naturalLabels
onActivated: fortManager.setLanguage(index)
}
2017-09-07 10:44:15 +00:00
}
Item {
Layout.fillHeight: true
}
Row {
spacing: 4
Label {
anchors.verticalCenter: parent.verticalCenter
text: translationManager.dummyBool
&& qsTranslate("qml", "Profile:")
}
LinkButton {
text: fortSettings.profilePath
onClicked: Qt.openUrlExternally("file:///" + text)
}
}
Row {
spacing: 4
Label {
anchors.verticalCenter: parent.verticalCenter
text: translationManager.dummyBool
&& qsTranslate("qml", "Releases:")
}
LinkButton {
text: fortSettings.appUpdatesUrl
onClicked: Qt.openUrlExternally(text)
}
}
2017-09-01 13:13:12 +00:00
}
}
}