diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-01-11 18:15:35 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-01-11 18:15:35 -0800 |
commit | 877efebaacedfb7e7dc01bc8b4a820826c376fbf (patch) | |
tree | 995b239e37da7a4e0664743c4396e2f1bf06f44c /qt-mobile/qml/DiveList.qml | |
parent | 3c8f7d72a2430b13edab2b4e57bf39baf2845ebb (diff) | |
parent | 142c8b218b1f9a4a3e217023531feedd7cf9713e (diff) | |
download | subsurface-877efebaacedfb7e7dc01bc8b4a820826c376fbf.tar.gz |
Merge github.com:sebasje/subsurface
Diffstat (limited to 'qt-mobile/qml/DiveList.qml')
-rw-r--r-- | qt-mobile/qml/DiveList.qml | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml index 06da8dee1..07b437c99 100644 --- a/qt-mobile/qml/DiveList.qml +++ b/qt-mobile/qml/DiveList.qml @@ -21,28 +21,11 @@ MobileComponents.Page { property real detailsOpacity : 0 property int horizontalPadding: MobileComponents.Units.gridUnit / 2 - MobileComponents.Units.smallSpacing + 1 - //When clicked, the mode changes to details view - + // When clicked, the mode changes to details view onClicked: { diveListView.currentIndex = model.index - detailsWindow.width = parent.width - detailsWindow.location = dive.location - detailsWindow.gps = dive.gps - detailsWindow.dive_id = dive.id - detailsWindow.diveNumber = dive.number - detailsWindow.duration = dive.duration - detailsWindow.depth = dive.depth - detailsWindow.rating = dive.rating - detailsWindow.buddy = dive.buddy - detailsWindow.suit = dive.suit - detailsWindow.airtemp = dive.airTemp - detailsWindow.watertemp = dive.waterTemp - detailsWindow.divemaster = dive.divemaster - detailsWindow.notes = dive.notes - detailsWindow.number = dive.number - detailsWindow.date = dive.date + " " + dive.time - // detailsWindow.weight = dive.weights - stackView.push(detailsWindow) + detailsWindow.showDiveIndex(index); + stackView.push(detailsWindow); } Item { @@ -154,6 +137,7 @@ MobileComponents.Page { } } } + ScrollView { anchors.fill: parent ListView { @@ -161,10 +145,14 @@ MobileComponents.Page { anchors.fill: parent model: diveModel currentIndex: -1 + Connections { + target: detailsWindow + onCurrentIndexChanged: diveListView.currentIndex = detailsWindow.currentIndex + } delegate: diveDelegate boundsBehavior: Flickable.StopAtBounds maximumFlickVelocity: parent.height * 5 - cacheBuffer: parent.height * 5 + cacheBuffer: Math.max(5000, parent.height * 5) //highlight: Rectangle { color: MobileComponents.Theme.highlightColor; width: MobileComponents.Units.smallSpacing } focus: true clip: true |