summaryrefslogtreecommitdiffstats
path: root/playerwidget.cpp
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2017-02-27 01:00:36 +0100
committerArno <arno@disconnect.de>2017-02-27 01:00:36 +0100
commitebdedb20cf24ed174156aac32711eaa71fb26ef6 (patch)
tree0e7e20549cfb1428edd3691d532573a0810fc74a /playerwidget.cpp
parentadd783bf8070a13027224ec5a2f45e557bea1506 (diff)
downloadBeetPlayer-ebdedb20cf24ed174156aac32711eaa71fb26ef6.tar.gz
BeetPlayer-ebdedb20cf24ed174156aac32711eaa71fb26ef6.tar.bz2
BeetPlayer-ebdedb20cf24ed174156aac32711eaa71fb26ef6.zip
Implement clear playlist
Diffstat (limited to 'playerwidget.cpp')
-rw-r--r--playerwidget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/playerwidget.cpp b/playerwidget.cpp
index ad3d060..f0bb6cf 100644
--- a/playerwidget.cpp
+++ b/playerwidget.cpp
@@ -121,6 +121,7 @@ void PlayerWidget::createActions(){
QAction *removeFromPlayListA = new QAction(QIcon(":/belly_left.png"), tr("Remove from playlist"), this);
connect(removeFromPlayListA, SIGNAL(triggered()), this, SLOT(removeFromPlayList()));
QAction *clearPlayListA = new QAction(QIcon(":/delete.png"), tr("Clear Playlist"), this);
+ connect(clearPlayListA, SIGNAL(triggered()), this, SLOT(clearPlayList()));
QAction *refreshA = new QAction(QIcon(":/refresh.png"), tr("Refresh..."), this);
connect(refreshA, SIGNAL(triggered()), this, SLOT(reindex()));
QAction *configA = Globals::instance()->action(Globals::ConfigAction);
@@ -351,3 +352,8 @@ void PlayerWidget::removeFromPlayList(){
mPlayListModel->removeRow(i.row());
}
}
+
+void PlayerWidget::clearPlayList(){
+ mPlayListModel->clear();
+ mPlayListModel->setHorizontalHeaderLabels(QStringList() << "Title");
+}