1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-09-01 01:51:58 +02:00

started integrating the breadcrumb

This commit is contained in:
Michael Zanetti
2012-12-14 01:37:41 +01:00
parent b8c2d1b0af
commit ac576046c9
3 changed files with 172 additions and 20 deletions

View File

@@ -15,6 +15,27 @@ Rectangle {
ListElement { label: "By Year"; image: "image://albumart/foobar"; creatorContent: "year" }
}
Connections {
target: stationView
onPagePicked: {
switch(createBy) {
case StationWidget.CreateByArtist:
stationCreator.content = "stations/CreateByArtist.qml";
break;
case StationWidget.CreateByGenre:
stationCreator.content = "stations/CreateByGenre.qml";
break;
case StationWidget.CreateByYear:
stationCreator.content = "stations/CreateByYear.qml";
break;
}
print("########", createBy, stationCreator.content)
stationListView.currentIndex = page;
}
}
VisualItemModel {
id: stationVisualModel
@@ -65,34 +86,34 @@ Rectangle {
}
}
RoundedButton {
Image {
id: backButton
text: "<"
height: defaultFontHeight * 4
width: height
hidden: stationListView.currentIndex == 0
opacity: stationListView.currentIndex == 0 ? 0 : 1
source: "../images/back-rest.svg"
smooth: true
anchors {
left: parent.left
bottom: parent.bottom
margins: defaultFontHeight * 2
}
onClicked: stationListView.decrementCurrentIndex()
MouseArea {
anchors.fill: parent
onClicked: stationListView.decrementCurrentIndex()
}
}
RoundedButton {
id: nextButton
text: stationListView.currentIndex == 2 ? "+" : ">"
Image {
height: defaultFontHeight * 4
//hidden: stationListView.currentIndex == 0 || !rootView.configured // This should work once rootView.configured works
hidden: stationListView.currentIndex != 2
opacity: stationListView.currentIndex != 2 ? 0 : 1
source: stationListView.currentIndex == 2 ? "../images/list-add.svg" : "../images/skip-rest.svg"
smooth: true
anchors {
right: parent.right
bottom: parent.bottom
margins: defaultFontHeight * 2
}
onClicked: stationListView.incrementCurrentIndex()
}
}