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

added a common DeclarativeView class that sets commonly used stuff

This commit is contained in:
Michael Zanetti
2012-12-02 17:15:30 +01:00
parent 1938fdc727
commit feede63a13
12 changed files with 162 additions and 64 deletions

View File

@@ -72,7 +72,7 @@ Item {
Row {
function createStation() {
rootView.startStationFromArtist(artistInputField.text)
mainView.startStationFromArtist(artistInputField.text)
}
anchors.fill: parent
@@ -106,7 +106,7 @@ Item {
showPlayButton: true
onClicked: {
rootView.startStationFromArtist(modelData);
mainView.startStationFromArtist(modelData);
stationCreator.next()
}
}
@@ -131,7 +131,7 @@ Item {
anchors.centerIn: parent
width: parent.width
onAccepted: {
rootView.startStationFromArtist(text)
mainView.startStationFromArtist(text)
stationCreator.next()
}
}
@@ -145,7 +145,7 @@ Item {
id: createByGenre
Row {
function createStation() {
rootView.startStationFromGenre(genreInputField.text)
mainView.startStationFromGenre(genreInputField.text)
}
anchors.fill: parent
@@ -167,7 +167,7 @@ Item {
model: styleModel//generator.styles()
onTagClicked: {
rootView.startStationFromGenre(item)
mainView.startStationFromGenre(item)
stationCreator.next()
}
@@ -192,7 +192,7 @@ Item {
anchors.centerIn: parent
width: parent.width
onAccepted: {
rootView.startStationFromGenre(text)
mainView.startStationFromGenre(text)
stationCreator.next()
}
}
@@ -224,7 +224,7 @@ Item {
spacing: selectYearText.height
function decadeClicked(decade) {
rootView.startStationFromYear(decade)
mainView.startStationFromYear(decade)
stationCreator.next()
}
@@ -251,7 +251,7 @@ Item {
anchors.centerIn: parent
width: parent.width
onAccepted: {
rootView.startStationFromYear(text)
mainView.startStationFromYear(text)
stationCreator.next()
}
}

View File

@@ -10,6 +10,16 @@ Item {
signal itemClicked(int index)
Text {
text: "Listen to radio..."
color: "white"
anchors {
left: parent.left
top: parent.top
margins: height * 2
}
}
GridView {
id: gridView
anchors.centerIn: parent

View File

@@ -14,7 +14,7 @@ Item {
anchors.centerIn: parent
height: backButton.height
width: height
visible: rootView.loading
visible: mainView.loading
RotationAnimation { target: busyIndicator; from: 360; to: 0; duration: 1500; running: visible; loops: Animation.Infinite }
}
@@ -29,11 +29,11 @@ Item {
currentIndex: currentlyPlayedIndex
onItemPlayPauseClicked: {
rootView.playItem(index)
mainView.playItem(index)
}
onItemClicked: {
rootView.playItem(index)
mainView.playItem(index)
}
}
@@ -51,7 +51,7 @@ Item {
font.pointSize: 18
width: parent.width
elide: Text.ElideRight
text: rootView.title
text: mainView.title
}
Text {
color: "white"