Files
harbour-henflow/qml/pages/MainPage.qml
T

69 lines
2.3 KiB
QML

import QtQuick 2.2
import Sailfish.Silica 1.0
Page {
id: page
allowedOrientations: Orientation.All
SilicaListView {
id: listView
anchors.fill: parent
header: PageHeader {
title: qsTr("Henflow")
}
model: ListModel {
id: sections
// Moduli previsti dall'app Android, da mappare sulle schermate
// Flutter quando i sorgenti arrivano sul server.
Component.onCompleted: {
append({ "name": qsTr("Hens"), "note": qsTr("name, breed, hatch date, estimated production") })
append({ "name": qsTr("Available eggs"), "note": qsTr("eggs ready today") })
append({ "name": qsTr("Orders"), "note": qsTr("customer, quantity, automatic delivery date") })
append({ "name": qsTr("Calendar"), "note": qsTr("orders and pickups") })
append({ "name": qsTr("Customers"), "note": qsTr("regular buyers") })
append({ "name": qsTr("Dashboard"), "note": qsTr("summary of the day") })
}
}
delegate: ListItem {
id: item
contentHeight: Theme.itemSizeMedium
Column {
anchors.verticalCenter: parent.verticalCenter
x: Theme.horizontalPageMargin
width: parent.width - 2 * Theme.horizontalPageMargin
Label {
text: model.name
color: item.highlighted ? Theme.highlightColor : Theme.primaryColor
truncationMode: TruncationMode.Fade
width: parent.width
}
Label {
text: model.note
font.pixelSize: Theme.fontSizeExtraSmall
color: Theme.secondaryColor
truncationMode: TruncationMode.Fade
width: parent.width
}
}
}
footer: Label {
x: Theme.horizontalPageMargin
width: parent.width - 2 * Theme.horizontalPageMargin
text: qsTr("Native port in progress")
font.pixelSize: Theme.fontSizeExtraSmall
color: Theme.secondaryHighlightColor
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
}
VerticalScrollDecorator {}
}
}