diff --git a/Transport.png b/Transport.png new file mode 100644 index 0000000..4478c88 Binary files /dev/null and b/Transport.png differ diff --git a/Transport.qml b/Transport.qml index ffc7130..854edce 100644 --- a/Transport.qml +++ b/Transport.qml @@ -43,66 +43,94 @@ Item { } } - TableView { - id: tableView + RowLayout { anchors.fill: parent - model: lineModel - frameVisible: false - Component.onCompleted: { - console.log(root.width) - console.log(tableView.width) + Rectangle { + id: logo + anchors.left: parent.left + anchors.right: parent.right + anchors.top: parent.top + height: 100 + color: "black" + Image { + source: "Transport.png" + anchors.fill: parent + fillMode: Image.PreserveAspectFit + + } } - style: TableViewStyle { - backgroundColor: "black" - alternateBackgroundColor: "black" - headerDelegate: Rectangle { - height: textItem.implicitHeight - width: textItem.implicitWidth - color: "black" - Text { - id: textItem - horizontalAlignment: Text.AlignLeft - text: styleData.value - font.bold: true - color: "white" - } + Rectangle { + anchors.left: parent.left + anchors.right: parent.right + anchors.top: logo.bottom + anchors.bottom: parent.bottom + + TableView { + id: tableView + anchors.fill: parent + model: lineModel + frameVisible: false + + Component.onCompleted: { + console.log(root.width) + console.log(tableView.width) } - itemDelegate: Rectangle { - color: "black" + style: TableViewStyle { + backgroundColor: "black" + alternateBackgroundColor: "black" - Text { - id: itemText - anchors.verticalCenter: parent.verticalCenter - color: "white" - text: styleData.value + headerDelegate: Rectangle { + height: textItem.implicitHeight + width: textItem.implicitWidth + color: "black" + Text { + id: textItem + horizontalAlignment: Text.AlignLeft + text: styleData.value + font.bold: true + color: "white" + } } + + itemDelegate: Rectangle { + color: "black" + + Text { + id: itemText + anchors.verticalCenter: parent.verticalCenter + color: "white" + text: styleData.value + } + } + } + TableViewColumn { + role: "number" + title: "No" + width: tableView.width / 6 + } + TableViewColumn { + role: "destination" + title: "Destination" + width: (tableView.width / 6) * 3 + } + TableViewColumn { + role: "arriving" + title: "Arriving" + width: tableView.width / 6 + } + TableViewColumn { + role: "next" + title: "Next" + width: (tableView.width / 6) + } + } } - TableViewColumn { - role: "number" - title: "No" - width: tableView.width / 6 - } - TableViewColumn { - role: "destination" - title: "Destination" - width: (tableView.width / 6) * 3 - } - TableViewColumn { - role: "arriving" - title: "Arriving" - width: tableView.width / 6 - } - TableViewColumn { - role: "next" - title: "Next" - width: (tableView.width / 6) - } } } diff --git a/Transport.xcf b/Transport.xcf new file mode 100644 index 0000000..41494dd Binary files /dev/null and b/Transport.xcf differ