mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-18 11:51:44 +02:00
* Imported QML resources.
This commit is contained in:
committed by
Michael Zanetti
parent
09c272a07c
commit
17eeae9a8f
69
data/qml/stations/CreateByArtist.qml
Normal file
69
data/qml/stations/CreateByArtist.qml
Normal file
@@ -0,0 +1,69 @@
|
||||
import QtQuick 1.1
|
||||
import tomahawk 1.0
|
||||
import "../tomahawkimports"
|
||||
|
||||
Item {
|
||||
id: root
|
||||
anchors.fill: parent
|
||||
|
||||
signal done()
|
||||
|
||||
function createStation(artist) {
|
||||
mainView.startStationFromArtist(artist)
|
||||
root.done()
|
||||
}
|
||||
|
||||
Column {
|
||||
id: upperColumn
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
height: parent.height
|
||||
width: defaultFontHeight * 30
|
||||
anchors.bottomMargin: defaultFontHeight
|
||||
spacing: defaultFontHeight
|
||||
|
||||
HeaderLabel {
|
||||
id: headerText
|
||||
text: "Create station by artist..."
|
||||
}
|
||||
|
||||
Row {
|
||||
height: artistInputField.height
|
||||
width: parent.width
|
||||
spacing: defaultFontHeight * 0.5
|
||||
|
||||
InputField {
|
||||
id: artistInputField
|
||||
width: parent.width - createFromInputButton.width - parent.spacing
|
||||
|
||||
onAccepted: createStation(text)
|
||||
}
|
||||
|
||||
PushButton {
|
||||
id: createFromInputButton
|
||||
text: "Go!"
|
||||
enabled: artistInputField.text.length > 2
|
||||
onClicked: createStation(artistInputField.text)
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
height: parent.height - headerText.height - artistInputField.height - parent.spacing * 3
|
||||
width: parent.width
|
||||
ArtistView {
|
||||
id: artistView
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
model: artistChartsModel
|
||||
clip: true
|
||||
delegateHeight: defaultFontHeight * 6
|
||||
|
||||
onItemClicked: {
|
||||
createStation(artistChartsModel.itemFromIndex(index).artistName);
|
||||
}
|
||||
}
|
||||
ScrollBar {
|
||||
listView: artistView
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user