import Backend 1.0
import QtQuick 2.9
import QtQuick.Controls 2.4
FannyDataListView {
id: foodList
anchors.fill: parent
model: FoodPlanModel {
id: foodPlanModel
}
delegate: Button {
id: delegate
width: foodList.width
height: contentCol.height + 10
Column {
id: contentCol
anchors {
top: parent.top
left: parent.left
right: parent.right
margins: 10
height: childrenRect.height + 10
spacing: 2
Label {
id: cookteamLa
// label for the cookteam
width: parent.width
wrapMode: Label.Wrap
font.bold: true
text: cookteam
id: dateLa
// label for the date
text: date
Rectangle {
height: 2
color: "grey"
id: mainDishLa
// label for the main dish
text: mainDish
width: parent.width / 10
height: mainDishVegLa.text!=""? 1:0
id: mainDishVegLa
// label for the vegetarian main dish
height: text!=""? undefined:0
text: mainDishVeg
height: garnishLa.text!=""? 1:0
id: garnishLa
// label for the garnish
text: garnish
height: dessertLa.text!=""? 1:0
id: dessertLa
// label for the dessert
text: dessert