This repository has been archived on 2022-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
fanny-app/qml/FoodPlanForm.qml

55 lines
1.3 KiB
QML
Raw Normal View History

2018-06-22 15:33:16 +02:00
import QtQuick 2.9
import QtQuick.Controls 2.2
Page {
anchors.fill: parent
title: qsTr("Speiseplanplan")
2018-06-24 09:23:10 +02:00
property bool loaded: false
2018-06-22 15:33:16 +02:00
2018-06-24 09:23:10 +02:00
Timer {
id: firstLoadTimer
interval: 1;
running: true
repeat: false
onTriggered: {
_cppServerConn.getFoodPlan()
loaded = true
}
}
2018-06-22 15:33:16 +02:00
2018-06-24 09:23:10 +02:00
ScrollView {
anchors.fill: parent
ListView {
enabled: loaded
width: parent.width
model: 8
delegate: ItemDelegate {
//text: getText(index, "cookteam")
width: parent.width
Label {
anchors.left: parent.left
anchors.top: parent.top
id: cookteam
text: _cppServerConn.getFoodPlanData(index).cookteam
}
Label {
anchors.left: parent.left
anchors.bottom: parent.bottom
id: date
text: _cppServerConn.getFoodPlanData(index).date
}
}
2018-06-22 15:33:16 +02:00
}
2018-06-24 09:23:10 +02:00
2018-06-22 15:33:16 +02:00
}
2018-06-24 09:23:10 +02:00
function getText(indexvar, type){
if(!loaded){
_cppServerConn.getFoodPlan()
loaded = true
2018-06-22 15:33:16 +02:00
}
2018-06-24 09:23:10 +02:00
//console.log(_cppServerConn.getFoodPlanData(indexvar))
2018-06-22 15:33:16 +02:00
}
}