-
Notifications
You must be signed in to change notification settings - Fork 0
/
QRscan.ui.qml
88 lines (70 loc) · 1.84 KB
/
QRscan.ui.qml
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
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtMultimedia 5.9
Page {
width: 380
height: 640
title: qsTr("Nuova transazione")
Connections {
target: button
onClicked: stackView.push("InsertMoney.ui.qml")
}
Text {
width: stackView.width
y: 30
text: qsTr("Scansiona codice QR")
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 12
}
Item {
id: cameraItem
width: 300
height: 300
x: stackView.width/2 - 150
y: 70
Camera {
id: camera
imageProcessing.whiteBalanceMode: CameraImageProcessing.WhiteBalanceFlash
exposure {
exposureCompensation: -1.0
exposureMode: Camera.ExposurePortrait
}
flash.mode: Camera.FlashOff
imageCapture {
onImageCaptured: {
photoPreview.source = preview // Show the preview in an Image
}
}
}
VideoOutput {
source: camera
anchors.fill: parent
orientation: 270
fillMode: VideoOutput.PreserveAspectCrop
focus : visible // to receive focus and capture key events when visible
}
Image {
id: photoPreview
}
}
Text {
width: stackView.width
y: cameraItem.y + 320
text: qsTr("oppure")
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 12
}
TextField {
id: textField
x: stackView.width/2 - 150
y: cameraItem.y + 370
width: 300
placeholderText: qsTr("Inserisci codice utente")
}
Button {
id: button
x: stackView.width/2 - button.width/2
y: cameraItem.y + 420
text: qsTr("Conferma")
}
}