summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@digia.com>2014-10-22 10:11:51 +0200
committerCaroline Chao <caroline.chao@theqtcompany.com>2014-10-22 15:23:15 +0200
commitf119b9121a807aca0bfa949cdade2cdc064ef8a8 (patch)
tree2c035dd137a020b3dc04d9cbf728b83ba5b993e6
parent10946b05a25f211b6853eda92f614c26a056310a (diff)
Add a "no cached data" message when no data is available
Used for offline mode. Change-Id: Ie09b53c0a084d17de33d63f05a9e3a96a6427599 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
-rw-r--r--qml/components/TrackSwitcher.qml14
-rw-r--r--src/theme.cpp1
2 files changed, 15 insertions, 0 deletions
diff --git a/qml/components/TrackSwitcher.qml b/qml/components/TrackSwitcher.qml
index 1a19307..411ab40 100644
--- a/qml/components/TrackSwitcher.qml
+++ b/qml/components/TrackSwitcher.qml
@@ -239,6 +239,20 @@ Rectangle {
height: listView.height
}
+ Text {
+ id: emptySchedule
+ text: Theme.text.noCachedData
+ anchors.left: root.left
+ anchors.top: daysWitcher.bottom
+ anchors.topMargin: Theme.sizes.dayLabelHeight
+ anchors.right: root.right
+ height: parent.height
+ verticalAlignment: Text.AlignTop
+ horizontalAlignment: Text.AlignHCenter
+ font.pointSize: Theme.fonts.ten_pt
+ visible: timeColumn.timeList.length === 0
+ }
+
Flickable {
id: flickable1
anchors.left: trackHeader.right
diff --git a/src/theme.cpp b/src/theme.cpp
index b7a8e48..b0f6338 100644
--- a/src/theme.cpp
+++ b/src/theme.cpp
@@ -90,6 +90,7 @@ Theme::Theme(QObject *parent)
m_text->insert(QLatin1String("networkErrorInit"), tr("Network Error: check your device's network connection"));
m_text->insert(QLatin1String("endedEvent"), tr("The conference has now ended"));
m_text->insert(QLatin1String("toWebsite"), tr("Website (external)"));
+ m_text->insert(QLatin1String("noCachedData"), tr("No Cached Data"));
m_colors = new QQmlPropertyMap(this);
m_colors->insert(QLatin1String("white"), QVariant("#ffffff"));