diff options
author | Grace Karanja <gracie.karanja89@gmail.com> | 2015-06-10 18:49:55 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-20 14:27:47 -0700 |
commit | 4c40908954ec1490f59b509744e20ae75f21c628 (patch) | |
tree | 14e7f054c962492edb3f820c81a7a23d90cace8a | |
parent | 28ab1f6413c7ec6e03ecd0cbdb682b261beba305 (diff) | |
download | subsurface-4c40908954ec1490f59b509744e20ae75f21c628.tar.gz |
Group dives by location
Group dives on the QML page by location.
Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-mobile/main.qml | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/qt-mobile/main.qml b/qt-mobile/main.qml index a3da04d9c..03f20890d 100644 --- a/qt-mobile/main.qml +++ b/qt-mobile/main.qml @@ -48,9 +48,9 @@ ApplicationWindow { id: wrapper width: parent.width; height: 55 Column { - Text { text: '#:' + diveNumber + "(" + location + ")" } - Text { text: date } - Text { text: duration + " " + depth } + Text { text: '#:' + diveNumber + "(" + date + ")" } + Text { text: 'Duration: ' + duration } + Text { text: 'Depth: ' + depth } } MouseArea { anchors.fill: parent; onClicked: diveListView.currentIndex = index } @@ -76,6 +76,20 @@ ApplicationWindow { } } + Component { + id: tripHeading + Rectangle { + width: container.width + height: childrenRect.height + color: "lightgreen" + + Text { + text: section + font.bold: true + } + } + } + ListView { id: diveListView width: parent.width; height: parent.height @@ -85,6 +99,10 @@ ApplicationWindow { focus: true highlight: highlightBar highlightFollowsCurrentItem: false + + section.property: "location" + section.criteria: ViewSection.FullString + section.delegate: tripHeading } } } |