summaryrefslogtreecommitdiffstats
path: root/demos/declarative/photoviewer/photoviewer.qml
diff options
context:
space:
mode:
Diffstat (limited to 'demos/declarative/photoviewer/photoviewer.qml')
-rw-r--r--demos/declarative/photoviewer/photoviewer.qml19
1 files changed, 16 insertions, 3 deletions
diff --git a/demos/declarative/photoviewer/photoviewer.qml b/demos/declarative/photoviewer/photoviewer.qml
index 5ce02f3..02134ac 100644
--- a/demos/declarative/photoviewer/photoviewer.qml
+++ b/demos/declarative/photoviewer/photoviewer.qml
@@ -6,6 +6,7 @@ Rectangle {
property real downloadProgress: 0
property bool imageLoading: false
+ property bool editMode: false
width: 800; height: 480; color: "#d5d6d8"
@@ -21,8 +22,20 @@ Rectangle {
VisualDataModel { id: albumVisualModel; model: photosModel; delegate: AlbumDelegate {} }
GridView {
- width: parent.width; height: parent.height; cellWidth: 210; cellHeight: 220; model: albumVisualModel.parts.album
- visible: albumsShade.opacity != 1.0
+ id: albumView; width: parent.width; height: parent.height; cellWidth: 210; cellHeight: 220
+ model: albumVisualModel.parts.album; visible: albumsShade.opacity != 1.0
+ }
+
+ Column {
+ spacing: 20; anchors { bottom: parent.bottom; right: parent.right; rightMargin: 20; bottomMargin: 20 }
+ Button { id: deleteButton; label: "Edit"; rotation: -2; onClicked: mainWindow.editMode = !mainWindow.editMode }
+ Button {
+ id: newButton; label: "New"; rotation: 3
+ onClicked: {
+ photosModel.append( { tag: "" } )
+ albumView.positionViewAtIndex(albumView.count - 1, GridView.Contain)
+ }
+ }
}
Rectangle {
@@ -32,7 +45,7 @@ Rectangle {
ListView { anchors.fill: parent; model: albumVisualModel.parts.browser; interactive: false }
- Tag { id: backTag; label: "Back"; rotation: 3; x: parent.width - backTag.width - 6; y: -backTag.height - 8 }
+ Button { id: backButton; label: "Back"; rotation: 3; x: parent.width - backButton.width - 6; y: -backButton.height - 8 }
Rectangle { id: photosShade; color: 'black'; width: parent.width; height: parent.height; opacity: 0; visible: opacity != 0.0 }