mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-25 23:06:23 +02:00
some more work on stations merged
This commit is contained in:
79
data/qml/stations/CreateByYear.qml
Normal file
79
data/qml/stations/CreateByYear.qml
Normal file
@@ -0,0 +1,79 @@
|
||||
import QtQuick 1.1
|
||||
import tomahawk 1.0
|
||||
import "../tomahawkimports"
|
||||
|
||||
Item {
|
||||
id: root
|
||||
anchors.fill: parent
|
||||
|
||||
signal done(string text)
|
||||
|
||||
function createStation(artist) {
|
||||
mainView.startStationFromArtist(artist)
|
||||
root.done(artist)
|
||||
}
|
||||
|
||||
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 year..."
|
||||
}
|
||||
|
||||
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
|
||||
// }
|
||||
// }
|
||||
|
||||
DoubleSlider {
|
||||
width: parent.width
|
||||
height: defaultFontHeight * 2
|
||||
min: 1960
|
||||
max: new Date().getFullYear()
|
||||
lowerSliderPos: 1990
|
||||
upperSliderPos: 2010
|
||||
minMaxLabelsVisible: false
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user