Add SwipeDelegateGroup in GenericDevicePage

This commit is contained in:
Michael Zanetti 2019-02-07 14:48:46 +01:00
parent 7d6986d683
commit 9b62184eec
3 changed files with 7 additions and 1 deletions

View File

@ -21,6 +21,8 @@ Item {
ScrollBar.vertical: ScrollBar {}
SwipeDelegateGroup {}
onContentYChanged: {
if (!engine.jsonRpcClient.ensureServerVersion("1.10")) {
if (!logsModel.busy && contentY - originY < 5 * height) {

View File

@ -26,6 +26,7 @@ DeviceListPageBase {
ListView {
anchors.fill: parent
model: root.devicesProxy
delegate: ThingDelegate {
width: parent.width
device: engine.deviceManager.devices.getDevice(model.id);

View File

@ -21,6 +21,8 @@ DevicePageBase {
anchors.fill: parent
clip: true
SwipeDelegateGroup {}
section.property: "type"
section.delegate: ListSectionHeader {
text: {
@ -82,7 +84,7 @@ DevicePageBase {
}
}
onClicked: pageStack.push(Qt.resolvedUrl("DeviceLogPage.qml"), {device: root.device, filterTypeIds: [model.id]})
onClicked: swipe.close()
swipe.right: RowLayout {
height: delegate.height
@ -96,6 +98,7 @@ DevicePageBase {
name: "../images/logs.svg"
}
onClicked: {
swipe.close();
pageStack.push(Qt.resolvedUrl("DeviceLogPage.qml"), {device: root.device, filterTypeIds: [model.id]})
}
}