lena_pi/LenaPi/Navigation.qml
2021-03-13 17:06:39 +01:00

64 lines
1.7 KiB
QML

import QtQuick 2.0
/**
* @brief Navigation view containing list view displaying artists or genres and albums
*/
Item {
id: container
property int margins: 20
RoundButton{
id: back
anchors.top: parent.top
anchors.left: parent.left
anchors.margins: container.margins
visible: navigationList.pIsBackVisible
onClicked: navigationList.navigateBack();
} // RoundButton: navigate back
RoundButton{
id: closeApp
anchors.right: parent.right
anchors.top: parent.top
anchors.margins: container.margins
imageSource: "qrc:/icon_close"
onClicked: {
Qt.quit();
}
} // RoundButton: closeApp
Rectangle{
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
height: 210
color: "#99ffffff"
ListView{
id: circleList
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.margins: 20
height: parent.height - 40
model: navigationList.pModelItems
spacing: 20
orientation: ListView.Horizontal
delegate: NavigationListDelegate{
id: delegate
property var delegateModel: navigationList.pModelItems[index]
height: parent.height
width: height
isCircleDelegate: delegateModel.pIsCircleDelegate
imageSource: delegateModel.pImageSource
onClicked: delegateModel.onClicked();
} // NavigationListDelegate
} // ListView
} // Rectangle: List background
} // Item