-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChannels.qml
88 lines (77 loc) · 2.45 KB
/
Channels.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
import QtQuick.Window
import QtQuick.Layouts
import QtQuick.Controls
import QtMultimedia
import "listBuilder.js" as Build
import "serviceCalls.js" as Service
Rectangle {
property var chlList: [];
property string vidLink: "";
property var st;
function loadChannels(token) {
chlList = Service.fetchChannels(token);
Build.loadChannels(listModel, chlList);
}
function loadVideo() {
//stack.items[2].videourl = listModel.get(list.currentIndex).itemUrl;
//stack.push(stack.items[2], StackView.PushTransition);
myPlayer.start(listModel.get(list.currentIndex).itemUrl)
// Player.start(listModel.get(list.currentIndex).itemUrl)
}
RowLayout
{
Rectangle {
id: root
width: windowMain.width
height: windowMain.height
color: "#303030"
Component {
id: dragDelegate
Item {
id: content
height: 80
anchors.left: parent.left
anchors.right: parent.right
Rectangle {
id: body
anchors.fill: parent
color: "#303030"
border.width: 1
border.color: "white"
clip: false
Row {
id: column
anchors { fill: parent; }
leftPadding: 20
Image {
source: image
}
Text {
leftPadding: 20
anchors.verticalCenter: column.verticalCenter
font.pointSize: 24
color: "white"
text: name
}
property var itemUrl;
}
}
MouseArea {
anchors.fill: parent
onClicked: loadVideo()
}
}
}
ListView {
id: list
anchors { fill: parent; margins: 2 }
model: ListModel {
id: listModel
}
delegate: dragDelegate
cacheBuffer: 50
}
}
}
}