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:
63
data/qml/stations/CreateByArtist.qml
Normal file
63
data/qml/stations/CreateByArtist.qml
Normal 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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user