mirror of
https://github.com/tnodir/fort
synced 2024-11-15 05:25:56 +00:00
UI: AddressesPage: Add "Internet" & "Filter Internet" tabs.
This commit is contained in:
parent
8c468aaa69
commit
4c918df002
@ -27,5 +27,7 @@
|
||||
<file>images/shield.png</file>
|
||||
<file>images/textfield_rename.png</file>
|
||||
<file>images/tick.png</file>
|
||||
<file>images/world.png</file>
|
||||
<file>images/world_link.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -23,6 +23,7 @@
|
||||
<file>qml/pages/SchedulePage.qml</file>
|
||||
<file>qml/pages/StatisticsPage.qml</file>
|
||||
<file>qml/pages/addresses/AddressesColumn.qml</file>
|
||||
<file>qml/pages/addresses/AddressGroupRow.qml</file>
|
||||
<file>qml/pages/apps/AppsColumn.qml</file>
|
||||
<file>qml/pages/apps/AppsTextColumn.qml</file>
|
||||
<file>qml/pages/apps/SpeedLimitButton.qml</file>
|
||||
|
BIN
src/ui/images/world.png
Normal file
BIN
src/ui/images/world.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 923 B |
BIN
src/ui/images/world_link.png
Normal file
BIN
src/ui/images/world_link.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 957 B |
@ -1,65 +1,38 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.3
|
||||
import "../controls"
|
||||
import "addresses"
|
||||
import com.fortfirewall 1.0
|
||||
|
||||
BasePage {
|
||||
|
||||
property AddressGroup addressGroup: firewallConf.inetAddressGroup
|
||||
|
||||
RowLayout {
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: 10
|
||||
|
||||
AddressesColumn {
|
||||
id: includeAddresses
|
||||
TabBar {
|
||||
id: barGroups
|
||||
Layout.fillWidth: true
|
||||
|
||||
title {
|
||||
TabButton {
|
||||
icon.source: "qrc:/images/world.png"
|
||||
text: translationManager.dummyBool
|
||||
&& qsTranslate("qml", "Include")
|
||||
&& qsTranslate("qml", "Internet")
|
||||
}
|
||||
checkBoxAll {
|
||||
enabled: !excludeAddresses.checkBoxAll.checked
|
||||
|| checkBoxAll.checked
|
||||
TabButton {
|
||||
icon.source: "qrc:/images/world_link.png"
|
||||
text: translationManager.dummyBool
|
||||
&& qsTranslate("qml", "Include All")
|
||||
}
|
||||
|
||||
useAll: addressGroup.includeAll
|
||||
ipText: addressGroup.includeText
|
||||
|
||||
onUseAllToggled: {
|
||||
addressGroup.includeAll = checked;
|
||||
}
|
||||
onIpTextEdited: {
|
||||
addressGroup.includeText = ipText;
|
||||
&& qsTranslate("qml", "Filter Internet")
|
||||
}
|
||||
}
|
||||
|
||||
AddressesColumn {
|
||||
id: excludeAddresses
|
||||
HSeparator {}
|
||||
|
||||
title {
|
||||
text: translationManager.dummyBool
|
||||
&& qsTranslate("qml", "Exclude")
|
||||
}
|
||||
checkBoxAll {
|
||||
enabled: !includeAddresses.checkBoxAll.checked
|
||||
|| checkBoxAll.checked
|
||||
text: translationManager.dummyBool
|
||||
&& qsTranslate("qml", "Exclude All")
|
||||
}
|
||||
AddressGroupRow {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
useAll: addressGroup.excludeAll
|
||||
ipText: addressGroup.excludeText
|
||||
|
||||
onUseAllToggled: {
|
||||
addressGroup.excludeAll = checked;
|
||||
}
|
||||
onIpTextEdited: {
|
||||
addressGroup.excludeText = ipText;
|
||||
}
|
||||
addressGroup: firewallConf.addressGroups[barGroups.currentIndex]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
61
src/ui/qml/pages/addresses/AddressGroupRow.qml
Normal file
61
src/ui/qml/pages/addresses/AddressGroupRow.qml
Normal file
@ -0,0 +1,61 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.3
|
||||
import com.fortfirewall 1.0
|
||||
|
||||
RowLayout {
|
||||
|
||||
spacing: 10
|
||||
|
||||
property AddressGroup addressGroup
|
||||
|
||||
AddressesColumn {
|
||||
id: includeAddresses
|
||||
|
||||
title {
|
||||
text: translationManager.dummyBool
|
||||
&& qsTranslate("qml", "Include")
|
||||
}
|
||||
checkBoxAll {
|
||||
enabled: !excludeAddresses.checkBoxAll.checked
|
||||
|| checkBoxAll.checked
|
||||
text: translationManager.dummyBool
|
||||
&& qsTranslate("qml", "Include All")
|
||||
}
|
||||
|
||||
useAll: addressGroup.includeAll
|
||||
ipText: addressGroup.includeText
|
||||
|
||||
onUseAllToggled: {
|
||||
addressGroup.includeAll = checked;
|
||||
}
|
||||
onIpTextEdited: {
|
||||
addressGroup.includeText = ipText;
|
||||
}
|
||||
}
|
||||
|
||||
AddressesColumn {
|
||||
id: excludeAddresses
|
||||
|
||||
title {
|
||||
text: translationManager.dummyBool
|
||||
&& qsTranslate("qml", "Exclude")
|
||||
}
|
||||
checkBoxAll {
|
||||
enabled: !includeAddresses.checkBoxAll.checked
|
||||
|| checkBoxAll.checked
|
||||
text: translationManager.dummyBool
|
||||
&& qsTranslate("qml", "Exclude All")
|
||||
}
|
||||
|
||||
useAll: addressGroup.excludeAll
|
||||
ipText: addressGroup.excludeText
|
||||
|
||||
onUseAllToggled: {
|
||||
addressGroup.excludeAll = checked;
|
||||
}
|
||||
onIpTextEdited: {
|
||||
addressGroup.excludeText = ipText;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user