1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-09-03 02:42:52 +02:00

rework StationCreator page2

make use of artistchartsmodel
This commit is contained in:
Michael Zanetti
2012-12-02 21:11:57 +01:00
parent 25a9d21e8f
commit 73b5e977c8
13 changed files with 183 additions and 30 deletions

View File

@@ -0,0 +1,63 @@
import QtQuick 1.1
import tomahawk 1.0
import "../tomahawkimports"
Item {
id: root
anchors.fill: parent
signal done()
ListModel {
id: dummyArtistModel
ListElement { modelData: "Pink Floyd" }
ListElement { modelData: "Tool" }
ListElement { modelData: "Cake" }
ListElement { modelData: "Metallica" }
ListElement { modelData: "Red Hot Chili Peppers" }
ListElement { modelData: "Korn" }
ListElement { modelData: "Prodigy" }
ListElement { modelData: "Otto Waalkes" }
}
Column {
id: upperColumn
anchors.fill: parent
anchors.bottomMargin: defaultFontHeight
spacing: defaultFontHeight
HeaderLabel {
id: headerText
text: "Create station by artist..."
}
Row {
width: defaultFontHeight * 15
height: artistInputField.height
spacing: defaultFontHeight
InputField {
id: artistInputField
width: parent.width - createFromInputButton.width - parent.spacing
}
RoundedButton {
id: createFromInputButton
text: ">"
height: artistInputField.height
}
}
ArtistView {
height: parent.height - headerText.height - artistInputField.height
width: defaultFontHeight * 15
model: artistChartsModel
clip: true
onItemClicked: {
mainView.startStationFromArtist(artistChartsModel.itemFromIndex(index).artistName)
root.done()
}
}
}
}