diff options
Diffstat (limited to 'basicsuite/qt5-everywhere/demos/radio/radio.qml')
-rw-r--r-- | basicsuite/qt5-everywhere/demos/radio/radio.qml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/basicsuite/qt5-everywhere/demos/radio/radio.qml b/basicsuite/qt5-everywhere/demos/radio/radio.qml index 9bd7152..e81c567 100644 --- a/basicsuite/qt5-everywhere/demos/radio/radio.qml +++ b/basicsuite/qt5-everywhere/demos/radio/radio.qml @@ -102,6 +102,22 @@ FocusScope { radius: height/2 + Item { + id: networkErrorBox + opacity: 0 + anchors.fill: parent + + Text { + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: parent.width * 0.1 + text: qsTr("Sorry! No network connection") + font.pixelSize: stationList.height*.1; + color: "white" + smooth: true + } + } + PathView { enabled: root.activeFocus id: stationList @@ -214,6 +230,14 @@ FocusScope { query: "/radio/channel" XmlRole {name: "title"; query: "title/string()"} XmlRole {name: "url"; query: "url/string()"} + + onStatusChanged: { + if (status == XmlListModel.Ready) { + networkErrorBox.opacity = 0; + } else if (status == XmlListModel.Error) { + networkErrorBox.opacity = 1; + } + } } VolumeButton { |