~stefan-schwarzburg/qreator/touch-reorganized-colortheme

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
import Ubuntu.Components.Popups 0.1
import QtQuick.LocalStorage 2.0

import "../qreator"


Page {
    id: pageQrWifi
    title: i18n.tr("Wireless access QR code")
    visible: false
    onVisibleChanged: qrcanvaswifi.requestQrCodePaint(qrcanvaswifi.text)
    
    ListModel {
        id: wifiSecurity
        ListElement {
            security: "WPA"
            index: 0
        }
        ListElement {
            security: "WEP"
            index: 1
        }
        ListElement {
            security: "No security"
            index: 2
        }
    }
    
    Column {
        anchors.centerIn: parent
        spacing: units.gu(4)
	
        Column {
            spacing: units.gu(2)
	    
            TextField {
                id: textQrCodeSsid
                placeholderText: i18n.tr("Type the wifi network's identifier")
                hasClearButton: true
                width: units.gu(33)
		
                onTextChanged: {qrcanvaswifi.requestQrCodePaint(text)}
            }
	    
            Button {
                id: selectorSecurity
                //property int currencyIndex: 0
                //property  TextField input: inputFrom
                //text: currencies.getCurrency(currencyIndex)
                // open the popover
                text: i18n.tr("Select security")
                width: units.gu(33)
                onClicked: PopupUtils.open(popoverWifiSecurity, selectorSecurity)
                onTextChanged: {qrcanvaswifi.requestQrCodePaint(text)}
            }
	    
            Row {
                spacing: units.gu(2)
		
                TextField {
                    id: textQrCodePassword
                    placeholderText: i18n.tr("Type the wifi network's password")
                    hasClearButton: true
                    echoMode: switchPassword.checked ? TextInput.Normal : TextInput.Password
                    width: units.gu(33) - parent.spacing - switchPassword.width
		    
                    onTextChanged: {qrcanvaswifi.requestQrCodePaint(text)}
                }
		
                Switch {
                    id: switchPassword
                    checked: false
		    
                    //onClicked:
                }
            }
        }
	
        QrCodeCanvas {
            id: qrcanvaswifi
            width: units.gu(33)
            height: units.gu(33)
        }
    }
    tools: QrCodeToolBar{}    
}