2
* Copyright 2013 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by Nick Dedekind <nick.dedekind@gmail.com>
20
import Ubuntu.Components 0.1
21
import Ubuntu.Components.ListItems 0.1 as ListItem
26
property bool playing: false
28
property bool canPlay: false
29
property bool canGoNext: false
30
property bool canGoPrevious: false
33
signal play(bool play)
36
implicitHeight: controlsRow.height + units.gu(2)
43
topMargin: units.gu(1)
44
horizontalCenter: parent.horizontalCenter
49
objectName: "previousButton"
52
onClicked: menu.previous()
54
enabled: canGoPrevious
55
anchors.verticalCenter: parent.verticalCenter
59
anchors.margins: units.gu(1)
60
name: "media-skip-backward"
61
color: Theme.palette.normal.foregroundText
66
objectName: "playButton"
69
onClicked: menu.play(!playing)
72
anchors.verticalCenter: parent.verticalCenter
76
anchors.margins: units.gu(1)
77
name: playing ? "media-playback-pause" : "media-playback-start"
78
color: Theme.palette.normal.foregroundText
83
objectName: "nextButton"
86
onClicked: menu.next()
89
anchors.verticalCenter: parent.verticalCenter
93
anchors.margins: units.gu(1)
94
name: "media-skip-forward"
95
color: Theme.palette.normal.foregroundText