Update ContentView to show selected show metadata

This commit is contained in:
2022-08-31 21:28:02 -04:00
parent 60676ffde9
commit 6b54653572
3 changed files with 65 additions and 19 deletions
+4
View File
@@ -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"]
+35
View File
@@ -30,6 +30,40 @@ TabView {
width: 40
}
Column {
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"
}
}
}
Item {
height: 40
width: parent.width
}
Column {
id: elementColumn
spacing: 20
Element {
title: "In Progress"
@@ -50,6 +84,7 @@ TabView {
}
}
}
}
states: [
State {
name: "deselected"
+11 -4
View File
@@ -10,19 +10,26 @@ Column {
property int xIndex
Item {
width: 10
height: 40
height: 20
}
Row {
Item {
height: parent.height
width: 16
}
Text {
text: title
font.pointSize: 30
color: "white"
font.pointSize: 15
color: "#cdd7d9"
}
}
Item {
width: 10
height: 40
height: 15
}
Row {
Repeater {
id: repeater
property var provider: modelData
model: repeaterModel
Show {