MainMenu component was added

This commit is contained in:
2023-03-30 11:01:39 +02:00
parent 44dd3cdb58
commit b0646ff112
4 changed files with 80 additions and 35 deletions

View File

@@ -0,0 +1,49 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
Drawer {
property alias logo: logoImage.source
property alias appName: appNameLabel.text
property alias model: menuRepeater.model
signal actionSelected(var action)
width: parent.width * 0.66
height: parent.height
Column {
anchors.fill: parent
Row {
width: parent.width
height: 100
Image {
id: logoImage
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.margins: 10
}
Label {
id: appNameLabel
anchors.verticalCenter: parent.verticalCenter
font.pointSize: 20
text: qsTr("BeerLog v0.1")
}
}
Repeater {
id: menuRepeater
delegate: ItemDelegate {
width: parent.width
text: model.title
onClicked: actionSelected(model.action)
}
}
}
}