mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
28ab1f6413
commit
4c40908954
1 changed files with 21 additions and 3 deletions
|
@ -48,9 +48,9 @@ ApplicationWindow {
|
||||||
id: wrapper
|
id: wrapper
|
||||||
width: parent.width; height: 55
|
width: parent.width; height: 55
|
||||||
Column {
|
Column {
|
||||||
Text { text: '#:' + diveNumber + "(" + location + ")" }
|
Text { text: '#:' + diveNumber + "(" + date + ")" }
|
||||||
Text { text: date }
|
Text { text: 'Duration: ' + duration }
|
||||||
Text { text: duration + " " + depth }
|
Text { text: 'Depth: ' + depth }
|
||||||
}
|
}
|
||||||
MouseArea { anchors.fill: parent; onClicked: diveListView.currentIndex = index }
|
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 {
|
ListView {
|
||||||
id: diveListView
|
id: diveListView
|
||||||
width: parent.width; height: parent.height
|
width: parent.width; height: parent.height
|
||||||
|
@ -85,6 +99,10 @@ ApplicationWindow {
|
||||||
focus: true
|
focus: true
|
||||||
highlight: highlightBar
|
highlight: highlightBar
|
||||||
highlightFollowsCurrentItem: false
|
highlightFollowsCurrentItem: false
|
||||||
|
|
||||||
|
section.property: "location"
|
||||||
|
section.criteria: ViewSection.FullString
|
||||||
|
section.delegate: tripHeading
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue