blob: d1f5e592e66cc60c1814af7ec57151f79c512180 (
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
100
101
102
|
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0
Item {
width: 640
height: 480
RowLayout {
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 20
anchors.top: parent.top
}
Flickable {
id: flickable
width: 472
height: 411
x: 8
y: 8
TextArea {
objectName: "chat_area"
id: textArea
x: 8
y: 8
anchors.fill: parent
wrapMode: TextArea.Wrap
textFormat: TextEdit.RichText
font.family: "Source Code Pro"
font.pointSize: 9
selectByMouse: true
}
ScrollBar.vertical: ScrollBar { }
}
TextField {
signal send_to_irc
objectName: "input"
id: textField
x: 8
y: 429
width: 472
height: 43
selectByMouse: true
Keys.onEnterPressed: send_to_irc()
Keys.onReturnPressed: send_to_irc()
}
ListView {
id: nickListView
objectName: "nick_list"
x: 486
y: 8
width: 146
height: 357
delegate: Item {
x: 5
width: 146
height: 20
Text {
text: name
anchors.verticalCenter: parent.verticalCenter
font.bold: true
font.family: "Source Code Pro"
font.pointSize: 11
}
}
model: ListModel {
id: nickListModel
}
function add_nick(nick){
nickListModel.append({name: nick})
}
function remove_nick(nick){
for (var i = 0; i < nickListModel.count; ++i) {
if (nickListModel.get(i).name === nick) {
nickListModel.remove(i)
}
}
}
}
Button {
objectName: "connect_button"
id: connect_button
x: 519
y: 380
text: qsTr("Connect")
}
Button {
objectName: "send_button"
id: send_button
x: 519
y: 429
text: qsTr("Send")
}
}
|