harbour-labyrinth/qml/pages/CastInfoPage.qml
2025-05-30 16:03:59 +02:00

56 lines
1.5 KiB
QML

import QtQuick 2.0
import Sailfish.Silica 1.0
import "../JSONListModel"
import "../delegates"
Page {
id: page
property string showname: ""
property string showimage: ""
property string summary: ""
property string showid: ""
property string actorname: ""
property string filter: ""
//property string country: "DK"
//property string _country: country ? "?country="+country : ""
//property string jsonSource: "http://api.tvmaze.com/schedule"+_country
SilicaListView {
id: listView
anchors.fill: parent
clip: true
JSONListModel {
id: jsonModel1
source: "http://api.tvmaze.com/people/"+showid+"/castcredits?embed=show" //"http://api.tvmaze.com/schedule?country=US&date="+Qt.formatDateTime(new Date(), "yyyy-MM-dd") //2016-07-16" //+filter
query: "$[*]._embedded.show."
}
model: jsonModel1.model
BusyIndicator {
id: busyIndicator
running: !jsonModel1.jsonready
size: BusyIndicatorSize.Large
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
header: PageHeader {
id: pHeader
title: actorname
description: "Known for"
}
delegate: ShowDelegate {}
ViewPlaceholder {
enabled: listView.count == 0 && jsonModel1.jsonready
text: "No TVmaze data"
hintText: "no information about cast"
}
}
}