diff options
Diffstat (limited to 'demos/declarative')
5 files changed, 18 insertions, 2 deletions
diff --git a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml index 0821cea..d71834e 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml @@ -30,7 +30,12 @@ Component { VisualDataModel { id: visualModel; delegate: PhotoDelegate { } - model: RssModel { tags: tag } + model: RssModel { id: rssModel; tags: tag } + } + + BusyIndicator { + anchors { centerIn: parent; verticalCenterOffset: -20 } + on: rssModel.status != XmlListModel.Ready } PathView { diff --git a/demos/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml b/demos/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml new file mode 100644 index 0000000..919ac43 --- /dev/null +++ b/demos/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml @@ -0,0 +1,9 @@ +import Qt 4.6 + +Image { + id: container + property bool on: false + + source: "images/busy.png"; visible: container.on + NumberAnimation on rotation { running: container.on; from: 0; to: 360; repeat: true; duration: 1200 } +} diff --git a/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml index 5a4e63e..89fe3e8 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml @@ -32,7 +32,7 @@ Package { property int h: getHeight(content) property double s: calculateScale(w, h, photoWrapper.width) - color: '#898989'; anchors.centerIn: parent; smooth: true; border.color: 'white'; border.width: 3 + color: '#878787'; anchors.centerIn: parent; smooth: true; border.color: 'white'; border.width: 3 width: w * s; height: h * s; visible: originalImage.status != Image.Ready } Rectangle { @@ -40,6 +40,7 @@ Package { width: originalImage.paintedWidth + 6; height: originalImage.paintedHeight + 6 visible: !placeHolder.visible } + BusyIndicator { anchors.centerIn: parent; on: originalImage.status != Image.Ready } Image { id: originalImage; smooth: true; source: "http://" + getImagePath(content) fillMode: Image.PreserveAspectFit; width: photoWrapper.width; height: photoWrapper.height diff --git a/demos/declarative/photoviewer/PhotoViewerCore/images/busy.png b/demos/declarative/photoviewer/PhotoViewerCore/images/busy.png Binary files differnew file mode 100644 index 0000000..664c2b1 --- /dev/null +++ b/demos/declarative/photoviewer/PhotoViewerCore/images/busy.png diff --git a/demos/declarative/photoviewer/PhotoViewerCore/qmldir b/demos/declarative/photoviewer/PhotoViewerCore/qmldir index 1adce10..4821faa 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/qmldir +++ b/demos/declarative/photoviewer/PhotoViewerCore/qmldir @@ -3,3 +3,4 @@ PhotoDelegate PhotoDelegate.qml ProgressBar ProgressBar.qml RssModel RssModel.qml Tag Tag.qml +BusyIndicator BusyIndicator.qml |