diff options
author | Grace Karanja <gracie.karanja89@gmail.com> | 2015-06-11 09:39:32 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-20 14:28:39 -0700 |
commit | ee9452ae8ace9e5ec6b6c99ebb01ec3748e1bfaa (patch) | |
tree | d419139e5c00a1de0db6ec90fe43c03decdedd98 /qt-mobile | |
parent | f0c777975315e87a1ac7fe9ae31ce2a800420fdd (diff) | |
download | subsurface-ee9452ae8ace9e5ec6b6c99ebb01ec3748e1bfaa.tar.gz |
Group dives by trips
Group dives according to the allocated dive trips.
Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile')
-rw-r--r-- | qt-mobile/main.qml | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/qt-mobile/main.qml b/qt-mobile/main.qml index 0b03b6db4..8518f84df 100644 --- a/qt-mobile/main.qml +++ b/qt-mobile/main.qml @@ -72,21 +72,18 @@ ApplicationWindow { //And other details at the bottom. Row { id: topLayout - x: 10; y: 10; height: 50; width: parent.width + x: 10; y: 10; height: 60; width: parent.width spacing: 10 Column { - width: background.width; height: 50 + width: background.width; height: 60 spacing: 5 Text { text: diveNumber + ' (' + date + ')' - font.bold: true; font.pointSize: 16 - } - - Text { - text: location } + Text { text: location; width: details.width } + Text { text: '<b>Depth:</b> ' + depth + ' <b>Duration:</b>' + duration; width: details.width } } } @@ -109,19 +106,8 @@ ApplicationWindow { anchors { top: detailsTitle.bottom; bottom: parent.bottom } contentHeight: detailsView.height clip: true - - Column { - Row { - Text { text: 'Duration: ' + duration; width: details.width } - } - - Row { - Text { text: 'Depth: ' + depth; width: details.width } - } - - Row { - Text { text: 'Notes: ' + notes; wrapMode: Text.WordWrap; width: details.width } - } + Row { + Text { text: 'Notes: ' + notes; wrapMode: Text.WordWrap; width: details.width } } } } @@ -179,12 +165,31 @@ ApplicationWindow { } } + Component { + id: tripHeading + Rectangle { + width: page.width + height: childrenRect.height + color: "lightsteelblue" + + Text { + text: section + font.bold: true + font.pointSize: 16 + } + } + } + ListView { id: diveListView anchors.fill: parent model: diveModel delegate: diveDelegate focus: true + + section.property: "trip" + section.criteria: ViewSection.FullString + section.delegate: tripHeading } } } |