2017-05-29 17:55:36 +00:00
|
|
|
import QtQuick 2.6
|
2017-10-29 12:44:22 +00:00
|
|
|
import QtQuick.Controls 2.2 as Controls
|
2017-05-29 17:55:36 +00:00
|
|
|
import QtQuick.Window 2.2
|
|
|
|
import QtQuick.Dialogs 1.2
|
|
|
|
import QtQuick.Layouts 1.3
|
|
|
|
import org.subsurfacedivelog.mobile 1.0
|
2018-09-27 20:09:26 +00:00
|
|
|
import org.kde.kirigami 2.4 as Kirigami
|
2017-05-29 17:55:36 +00:00
|
|
|
|
|
|
|
Kirigami.AbstractListItem {
|
|
|
|
id: innerListItem
|
|
|
|
|
|
|
|
property string depth
|
|
|
|
property string datetime
|
|
|
|
property string duration
|
2017-06-04 12:40:25 +00:00
|
|
|
property bool selected
|
2017-05-29 17:55:36 +00:00
|
|
|
|
|
|
|
enabled: true
|
|
|
|
supportsMouseEvents: true
|
|
|
|
width: parent.width
|
2017-07-23 14:54:43 +00:00
|
|
|
height: Math.round(Kirigami.Units.gridUnit * 1.8)
|
|
|
|
padding: 0
|
2017-05-29 17:55:36 +00:00
|
|
|
|
2017-07-23 14:54:43 +00:00
|
|
|
property color textColor: subsurfaceTheme.secondaryTextColor
|
2017-05-29 17:55:36 +00:00
|
|
|
|
|
|
|
Row {
|
2017-07-23 14:54:43 +00:00
|
|
|
id: downloadedDive
|
2017-05-29 17:55:36 +00:00
|
|
|
width: parent.width
|
2017-07-23 14:54:43 +00:00
|
|
|
spacing: Kirigami.Units.largeSpacing
|
|
|
|
padding: 0
|
|
|
|
anchors.leftMargin: Math.round (Kirigami.Units.largeSpacing / 2)
|
|
|
|
anchors.fill: parent
|
2017-05-29 17:55:36 +00:00
|
|
|
add: Transition {
|
|
|
|
NumberAnimation { property: "opacity"; from: 0; to: 1.0; duration: 400 }
|
|
|
|
NumberAnimation { property: "scale"; from: 0; to: 1.0; duration: 400 }
|
|
|
|
}
|
2017-07-24 18:29:32 +00:00
|
|
|
SsrfCheckBox {
|
2017-06-04 12:40:25 +00:00
|
|
|
id: diveIsSelected
|
|
|
|
checked: innerListItem.selected;
|
2018-09-26 07:43:20 +00:00
|
|
|
width: childrenRect.width + 4 * Kirigami.Units.smallSpacing;
|
2017-06-04 12:40:25 +00:00
|
|
|
height: childrenRect.heigh - Kirigami.Units.smallSpacing;
|
2017-07-23 14:54:43 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2017-07-22 20:36:54 +00:00
|
|
|
onClicked: {
|
|
|
|
console.log("Clicked on the checkbox of item " + index)
|
|
|
|
importModel.selectRow(index)
|
|
|
|
}
|
2017-06-04 12:40:25 +00:00
|
|
|
}
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.Label {
|
2017-07-23 14:54:43 +00:00
|
|
|
id: dateLabel
|
|
|
|
text: innerListItem.datetime
|
2017-10-19 13:41:05 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2017-07-23 14:54:43 +00:00
|
|
|
width: Math.round(parent.width * 0.35)
|
|
|
|
font.pointSize: subsurfaceTheme.smallPointSize
|
|
|
|
color: textColor
|
|
|
|
}
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.Label {
|
2017-07-23 14:54:43 +00:00
|
|
|
text: innerListItem.depth + ' / ' + innerListItem.duration
|
2017-10-19 13:41:05 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2017-07-23 14:54:43 +00:00
|
|
|
width: Math.round(parent.width * 0.35)
|
|
|
|
font.pointSize: subsurfaceTheme.smallPointSize
|
|
|
|
color: textColor
|
2017-05-29 17:55:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|