Update ContentView to show selected show metadata
This commit is contained in:
@@ -32,6 +32,10 @@ class Show(QObject):
|
||||
def year(self) -> int:
|
||||
return self._source["year"]
|
||||
|
||||
@pyqtProperty("QString")
|
||||
def description(self) -> str:
|
||||
return self._source["description"]
|
||||
|
||||
@pyqtProperty(int)
|
||||
def episodes(self) -> int:
|
||||
return self._source["episodes"]
|
||||
|
||||
@@ -30,20 +30,55 @@ TabView {
|
||||
width: 40
|
||||
}
|
||||
Column {
|
||||
spacing: 20
|
||||
Element {
|
||||
title: "In Progress"
|
||||
provider: modelData
|
||||
repeaterModel: modelData.inProgress
|
||||
elemSelected: viewSelected && (0 == ySelect)
|
||||
xIndex: xSelect
|
||||
Row {
|
||||
Item {
|
||||
height: parent.height
|
||||
width: 16
|
||||
}
|
||||
Column {
|
||||
spacing: 20
|
||||
Item {
|
||||
height: 20
|
||||
width: parent.width
|
||||
}
|
||||
Text {
|
||||
text: elementColumn.children[ySelect].provider.getShow(xSelect).title
|
||||
font.pointSize: 30
|
||||
color: "#cdd7d9"
|
||||
}
|
||||
Text {
|
||||
text: elementColumn.children[ySelect].provider.getShow(xSelect).year
|
||||
font.pointSize: 15
|
||||
color: "#99afb4"
|
||||
}
|
||||
Text {
|
||||
text: elementColumn.children[ySelect].provider.getShow(xSelect).description
|
||||
font.pointSize: 13
|
||||
color: "#cdd7d9"
|
||||
}
|
||||
}
|
||||
}
|
||||
Element {
|
||||
title: "Recently Added"
|
||||
provider: modelData
|
||||
repeaterModel: modelData.recentlyAdded
|
||||
elemSelected: viewSelected && (1 == ySelect)
|
||||
xIndex: xSelect
|
||||
Item {
|
||||
height: 40
|
||||
width: parent.width
|
||||
}
|
||||
Column {
|
||||
id: elementColumn
|
||||
spacing: 20
|
||||
Element {
|
||||
title: "In Progress"
|
||||
provider: modelData
|
||||
repeaterModel: modelData.inProgress
|
||||
elemSelected: viewSelected && (0 == ySelect)
|
||||
xIndex: xSelect
|
||||
}
|
||||
Element {
|
||||
title: "Recently Added"
|
||||
provider: modelData
|
||||
repeaterModel: modelData.recentlyAdded
|
||||
elemSelected: viewSelected && (1 == ySelect)
|
||||
xIndex: xSelect
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,19 +10,26 @@ Column {
|
||||
property int xIndex
|
||||
Item {
|
||||
width: 10
|
||||
height: 40
|
||||
height: 20
|
||||
}
|
||||
Text {
|
||||
text: title
|
||||
font.pointSize: 30
|
||||
color: "white"
|
||||
Row {
|
||||
Item {
|
||||
height: parent.height
|
||||
width: 16
|
||||
}
|
||||
Text {
|
||||
text: title
|
||||
font.pointSize: 15
|
||||
color: "#cdd7d9"
|
||||
}
|
||||
}
|
||||
Item {
|
||||
width: 10
|
||||
height: 40
|
||||
height: 15
|
||||
}
|
||||
Row {
|
||||
Repeater {
|
||||
id: repeater
|
||||
property var provider: modelData
|
||||
model: repeaterModel
|
||||
Show {
|
||||
|
||||
Reference in New Issue
Block a user