Commit 8e7c12e4 authored by Camilo Higuita's avatar Camilo Higuita

add playlist menu

parent 4ea2b48f
......@@ -59,6 +59,13 @@ ApplicationWindow
}
}
function stop()
{
mainPlaylistTable.clearTable()
Player.stop()
playIcon.text= MdiFont.Icon.play
}
function pause()
{
Player.pauseTrack()
......@@ -254,6 +261,13 @@ ApplicationWindow
}
}
PlaylistMenu
{
id: playlistMenu
onClearOut: stop()
onHideCover: coverPlay.visible = !coverPlay.visible
}
MouseArea
{
anchors.fill: parent
......@@ -269,10 +283,15 @@ ApplicationWindow
width: parent.width
height: parent.height
anchors.fill: parent
ToolButton
{
id: menuBtn
Icon {text: MdiFont.Icon.dotsVertical}
onClicked: playlistMenu.open()
}
Row
{
anchors.centerIn: parent
ToolButton
{
Icon
......@@ -332,7 +351,12 @@ ApplicationWindow
onClicked: shuffle = !shuffle
}
}
}
}
......
......@@ -25,5 +25,6 @@
<file>assets/face.png</file>
<file>view_models/BabeHolder.qml</file>
<file>view_models/BabeDialog.qml</file>
<file>widgets/PlaylistMenu.qml</file>
</qresource>
</RCC>
function playTrack(track)
{
currentTrack = track
root.currentTrack = track
player.source(currentTrack.url);
player.play()
root.title = currentTrack.title + " - " +currentTrack.artist
......@@ -8,6 +8,14 @@ function playTrack(track)
}
function stop()
{
player.stop()
progressBar.value = 0
coverPlay.visible = false
root.title = "Babe..."
}
function pauseTrack()
{
player.pause()
......
......@@ -30,7 +30,6 @@ int Utils::lastPlaylistPos()
QString Utils::backgroundColor()
{
#if defined(Q_OS_ANDROID)
return "#31363b";
#elif defined(Q_OS_LINUX)
......@@ -39,12 +38,10 @@ return "#31363b";
#elif defined(Q_OS_WIN32)
return "#31363b";
#endif
}
QString Utils::foregroundColor()
{
#if defined(Q_OS_ANDROID)
return "#FFF";
#elif defined(Q_OS_LINUX)
......@@ -53,12 +50,10 @@ return "#FFF";
#elif defined(Q_OS_WIN32)
return "#FFF";
#endif
}
QString Utils::hightlightColor()
{
#if defined(Q_OS_ANDROID)
return "";
#elif defined(Q_OS_LINUX)
......@@ -84,12 +79,12 @@ return "#31363b";
QString Utils::altColor()
{
#if defined(Q_OS_ANDROID)
return "#31363b";
return "#232629";
#elif defined(Q_OS_LINUX)
QWidget widget;
return widget.palette().color(QPalette::Base).name();
#elif defined(Q_OS_WIN32)
return "#31363b";
return "#232629";
#endif
}
......
import QtQuick 2.9
import QtQuick.Controls 2.2
Menu
{
id: root
x: parent.width / 2 - width / 2
y: parent.height / 2 - height / 2
modal: true
signal clearOut()
signal clean()
signal callibrate()
signal hideCover()
MenuItem
{
text: qsTr("Clear out...")
onTriggered: clearOut()
}
MenuItem
{
text: qsTr("Clean...")
onTriggered: clean()
}
MenuItem
{
text: qsTr("Hide cover...")
onTriggered: hideCover()
}
MenuItem
{
text: qsTr("Callibrate")
onTriggered: callibrate()
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment