-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainForm.ui.qml
146 lines (127 loc) · 4.01 KB
/
MainForm.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
import QtQuick 2.4
import QtQuick.Controls 1.3
import QtQuick.Controls.Styles 1.3
import QtQuick.Layouts 1.1
Item {
id: item1
anchors.fill: parent
property alias word: label1
property alias statusMessage: statusMessage
property alias bNextWord: nextWord
property alias bLogin: bLogin
property alias bAsso: saveAssociation
property alias userName: textUsername
property alias userPassword: textPassword
property alias input: textWord
property string wordColor: "lightgreen"
property bool loggedOut: true
Image {
source: "qrc:images/tima.svg"
anchors.left: parent.left
anchors.leftMargin: 30
anchors.right: parent.right
anchors.rightMargin: 30
anchors.verticalCenter: parent.verticalCenter
visible: loggedOut
}
ColumnLayout {
id: columnLayout1
width: parent.width
height: parent.height
visible: !loggedOut
Item {
id: item2
width: parent.width
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
ProgressBar {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
indeterminate: true
visible: label1.text ? false : true
}
Label {
id: label1
text: qsTr("")
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
visible: text ? true : false
font.pointSize: 14
}
Text {
id: statusMessage
text: qsTr("")
color: "red"
anchors.bottom: label1.top
//anchors.horizontalCenter: parent.horizontalCenter
anchors.left: parent.left
anchors.right: parent.right
visible: text ? true : false
font.pointSize: 16
wrapMode: Text.Wrap
elide: Text.ElideMiddle
horizontalAlignment: Text.AlignHCenter
}
}
Item {
width: parent.width
Layout.fillWidth: true
RowLayout {
id: rowLayout1
anchors.left: parent.left
anchors.leftMargin: 30
anchors.right: parent.right
anchors.rightMargin: 30
spacing: 10
TextField {
id: textWord
Layout.fillWidth: true
style: TextFieldStyle {
textColor: "black"
background: Rectangle {
radius: 2
color: wordColor
implicitWidth: 100
implicitHeight: 24
border.color: "#333"
border.width: 1
}
}
KeyNavigation.tab: textUsername
}
Button {
id: saveAssociation
height: textWord.height
text: qsTr("Save Association")
}
Button {
id: nextWord
height: textWord.height
text: qsTr("Next Word")
}
}
}
}
Button {
id: bLogin
anchors.right: parent.right
anchors.top: parent.top
text: qsTr("Login")
}
TextField {
id: textPassword
text: ""
KeyNavigation.tab: textWord
echoMode: 2
anchors.right: bLogin.left
placeholderText: qsTr("Password")
}
TextField {
id: textUsername
text: ""
focus: true
KeyNavigation.tab: textPassword
anchors.right: textPassword.left
placeholderText: qsTr("Username")
}
}