blob: 9d9341ab494d1244cfefdbbf7d966661141b70a0 (
plain)
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
|
import Qt 4.7
Item {
id: wrapper
Column {
anchors.centerIn: parent
spacing: 20
Column{
spacing: 4
Text {
text: "Screen name:"
font.pixelSize: 16; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
horizontalAlignment: Qt.AlignRight
}
Item {
width: 220
height: 28
BorderImage { source: "images/lineedit.sci"; anchors.fill: parent }
TextInput{
id: nameIn
width: parent.width - 8
anchors.centerIn: parent
maximumLength:21
font.pixelSize: 16;
font.bold: true
color: "#151515"; selectionColor: "green"
KeyNavigation.down: passIn
focus: true
}
}
}
Column{
spacing: 4
Text {
text: "Password:"
font.pixelSize: 16; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
horizontalAlignment: Qt.AlignRight
}
Item {
width: 220
height: 28
BorderImage { source: "images/lineedit.sci"; anchors.fill: parent }
TextInput{
id: passIn
width: parent.width - 8
anchors.centerIn: parent
maximumLength:21
echoMode: TextInput.Password
font.pixelSize: 16;
font.bold: true
color: "#151515"; selectionColor: "green"
KeyNavigation.down: login
KeyNavigation.up: nameIn
}
}
}
Row{
spacing: 10
Button {
width: 100
height: 32
id: login
keyUsing: true;
function doLogin(){
rssModel.authName=nameIn.text;
rssModel.authPass=passIn.text;
rssModel.tags='my timeline';
screen.focus = true;
}
text: "Log in"
KeyNavigation.right: guest
KeyNavigation.up: passIn
Keys.onReturnPressed: login.doLogin();
Keys.onSelectPressed: login.doLogin();
Keys.onSpacePressed: login.doLogin();
onClicked: login.doLogin();
}
Button {
width: 100
height: 32
id: guest
keyUsing: true;
function doGuest()
{
rssModel.authName='-';
screen.focus = true;
screen.setMode(true);
}
text: "Guest"
KeyNavigation.left: login
KeyNavigation.up: passIn
Keys.onReturnPressed: guest.doGuest();
Keys.onSelectPressed: guest.doGuest();
Keys.onSpacePressed: guest.doGuest();
onClicked: guest.doGuest();
}
}
}
}
|