/*
- Copyright (C) 2013 Jolla Ltd.
- Contact: Thomas Perl <thomas.perl@jollamobile.com>
+ Copyright (C) 2014 David Llewellyn-Jones
+ Contact: David Llewellyn-Jones <david@flypig.co.uk>
All rights reserved.
You may use this file under the terms of BSD license as follows:
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ Built using the standard template from Jolla
+ Copyright (C) 2013 Jolla Ltd.
+ Contact: Thomas Perl <thomas.perl@jollamobile.com>
*/
import QtQuick 2.0
canAccept: true
acceptDestinationAction: PageStackAction.Pop
+ Connections {
+ target:VpnControl
+ }
+
SilicaFlickable {
// ComboBox requires a flickable ancestor
width: parent.width
TextField {
id: configureAddress
width: parent.width
+ text: VpnControl.server
label: "Server address"
placeholderText: "Server address"
focus: true
TextField {
id: configurePort
width: parent.width
+ text: VpnControl.port;
inputMethodHints: Qt.ImhFormattedNumbersOnly
label: "Port number"
placeholderText: "Port number"
TextSwitch {
id: configureCompression
text: "Use Compression"
+ checked: VpnControl.compressed
+ automaticCheck: true
}
TextSwitch {
id: configureTLS
text: "Use TLS authentication"
+ checked: VpnControl.useTLS
onCheckedChanged: {
configureTLSdirection.enabled = checked
configureTLSinfo.visible = checked
}
+ automaticCheck: true
}
// set currentIndex to change the selected value
ComboBox {
id: configureTLSdirection
width: parent.width
label: "TLS direction"
- currentIndex: 1
+ currentIndex: VpnControl.tlsDirection;
enabled: false
menu: ContextMenu {
}
onAccepted: {
+ VpnControl.setServer(configureAddress.text)
+ VpnControl.setPort(configurePort.text)
+ VpnControl.setCompressed(configureCompression.checked)
+ VpnControl.setUseTLS(configureTLS.checked)
+ VpnControl.setTlsDirection(configureTLSdirection.currentIndex)
+ VpnControl.updateConfiguration()
}
}