diff options
Diffstat (limited to 'playerwidget.cpp')
-rw-r--r-- | playerwidget.cpp | 6 |
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"); +} |