-
Notifications
You must be signed in to change notification settings - Fork 1
/
BrokerDelegate.qml
66 lines (62 loc) · 1.38 KB
/
BrokerDelegate.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
import QtQuick
import QtQuick.Layouts
Rectangle {
id: root
height: 50
//color: Style.delegateAltColor
signal connectToBrokerRequest(connection_id: int)
signal editBrokerRequest(connection_id: int)
required property int index
required property var model
required property string name
required property string connectionId
required property string connectionString
RowLayout {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.right: parent.right
MyButton {
id: playButton
width: height
radius:5
iconSource: "images/connect.svg"
iconMargin: 5
onTapped: {
root.connectToBrokerRequest(root.connectionId)
}
}
Column {
Layout.fillWidth: true
Text {
id: name
height: 27
text: root.name? root.name: "Connection name"
//verticalAlignment: Text.AlignVCenter
//font.pixelSize: Style.fontPixelSize
font.bold: true
}
Text {
id: connectionString
text: root.connectionString? root.connectionString: "Connection string"
//font.pixelSize: Style.fontPixelSize
}
}
MyButton {
id: editButton
width: height
border.width: 0
color: "white"
iconSource: "images/pencil.svg"
onTapped: {
root.editBrokerRequest(root.connectionId)
}
}
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
height: 2
color: "lightgray"
}
}