QML UI: show selection box on the Download from DC list

QML and C++ model don't interact too much, a new Rule
should be created and used on the QML

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2017-06-04 14:40:25 +02:00 committed by Dirk Hohndel
parent 78ee3f40a5
commit 03e771066b
4 changed files with 18 additions and 7 deletions

View file

@ -12,6 +12,7 @@ Kirigami.AbstractListItem {
property string depth
property string datetime
property string duration
property bool selected
enabled: true
supportsMouseEvents: true
@ -30,9 +31,15 @@ Kirigami.AbstractListItem {
NumberAnimation { property: "opacity"; from: 0; to: 1.0; duration: 400 }
NumberAnimation { property: "scale"; from: 0; to: 1.0; duration: 400 }
}
CheckBox {
id: diveIsSelected
checked: innerListItem.selected;
width: childrenRect.heigh - Kirigami.Units.smallSpacing;
height: childrenRect.heigh - Kirigami.Units.smallSpacing;
}
Item {
id: diveListEntry
width: parent.width - Kirigami.Units.gridUnit * (innerListItem.deleteButtonVisible ? 3 : 1)
width: parent.width - diveIsSelected.width - Kirigami.Units.gridUnit * (innerListItem.deleteButtonVisible ? 3 : 1)
height: childrenRect.height - Kirigami.Units.smallSpacing
Kirigami.Label {