2
* Copyright (C) 2016 Canonical Ltd.
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License version 3,
6
* as published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
import QtQuick.Layouts 1.1
19
import Ubuntu.Components 1.3
20
import Ubuntu.Components.ListItems 1.3 as ListItems
26
property alias neverDefault: ownNetworksToggle.checked
27
property bool enabled: true
30
text: i18n.dtr("ubuntu-settings-components", "Use this VPN for:")
32
color: theme.palette.normal.baseText
33
elide: Text.ElideRight
37
anchors { left: parent.left; right: parent.right }
40
ListItems.ThinDivider {}
43
anchors { left: parent.left; right: parent.right }
47
objectName: "vpnAllNetworksToggle"
48
checked: !ownNetworksToggle.checked
50
ownNetworksToggle.checked = !checked;
51
checked = Qt.binding(function () {
52
return !ownNetworksToggle.checked
55
enabled: routes.enabled
56
activeFocusOnPress: false
60
text: i18n.dtr("ubuntu-settings-components", "All network connections")
61
Layout.fillWidth: true
66
anchors { left: parent.left; right: parent.right }
70
objectName: "vpnOwnNetworksToggle"
71
enabled: routes.enabled
72
activeFocusOnPress: false
76
text: i18n.dtr("ubuntu-settings-components", "Its own network")
77
Layout.fillWidth: true
81
ListItems.ThinDivider {}