summaryrefslogtreecommitdiffstats
path: root/playerwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'playerwidget.cpp')
-rw-r--r--playerwidget.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/playerwidget.cpp b/playerwidget.cpp
index 35f3c40..603334a 100644
--- a/playerwidget.cpp
+++ b/playerwidget.cpp
@@ -17,6 +17,7 @@
#include "playerwidget.h"
#include "beetview.h"
+#include "indexerdialog.h"
#include "globals.h"
PlayerWidget::PlayerWidget(QWidget *parent) : QWidget(parent){
@@ -114,6 +115,8 @@ void PlayerWidget::createActions(){
QAction *addToPlayListA = new QAction(QIcon(":/belly_right.png"), tr("Add to playlist"), this);
QAction *removeFromPlayListA = new QAction(QIcon(":/belly_left.png"), tr("Remove from playlist"), this);
QAction *clearPlayListA = new QAction(QIcon(":/delete.png"), tr("Clear Playlist"), this);
+ QAction *refreshA = new QAction(QIcon(":/refresh.png"), tr("Refresh..."), this);
+ connect(refreshA, SIGNAL(triggered()), this, SLOT(reindex()));
QAction *configA = Globals::instance()->action(Globals::ConfigAction);
mView->addAction(addToPlayListA);
mView->addAction(removeFromPlayListA);
@@ -130,6 +133,8 @@ void PlayerWidget::createActions(){
mToolBar->addAction(removeFromPlayListA);
mToolBar->addAction(clearPlayListA);
mToolBar->addSeparator();
+ mToolBar->addAction(refreshA);
+ mToolBar->addSeparator();
mToolBar->addAction(configA);
QWidget* spacer2 = new QWidget();
spacer2->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
@@ -273,3 +278,8 @@ void PlayerWidget::clearFilter(){
mFilter->clear();
mView->setModel(mViewModel);
}
+
+void PlayerWidget::reindex(){
+ IndexerDialog dlg(this);
+ dlg.exec();
+}