diff options
-rw-r--r-- | beetplayer.qrc | 1 | ||||
-rw-r--r-- | belly_right_and_clear.png | bin | 0 -> 10396 bytes | |||
-rw-r--r-- | playerwidget.cpp | 11 | ||||
-rw-r--r-- | playerwidget.h | 1 |
4 files changed, 13 insertions, 0 deletions
diff --git a/beetplayer.qrc b/beetplayer.qrc index 0954138..7fb02ef 100644 --- a/beetplayer.qrc +++ b/beetplayer.qrc @@ -20,5 +20,6 @@ <file>genre.png</file> <file>stomp.png</file> <file>clean_tampon.png</file> + <file>belly_right_and_clear.png</file> </qresource> </RCC> diff --git a/belly_right_and_clear.png b/belly_right_and_clear.png Binary files differnew file mode 100644 index 0000000..7576007 --- /dev/null +++ b/belly_right_and_clear.png diff --git a/playerwidget.cpp b/playerwidget.cpp index 65cafb7..91654ae 100644 --- a/playerwidget.cpp +++ b/playerwidget.cpp @@ -200,6 +200,8 @@ void PlayerWidget::createActions(){ connect(nextA, SIGNAL(triggered()), this, SLOT(next())); QAction *addToPlayListA = new QAction(QIcon(":/belly_right.png"), tr("Add to playlist"), this); connect(addToPlayListA, SIGNAL(triggered()), this, SLOT(addToPlayList())); + QAction *addToPlayListAndClearA = new QAction(QIcon(":/belly_right_and_clear.png"), tr("Clear and add"), this); + connect(addToPlayListAndClearA, SIGNAL(triggered()), this, SLOT(addToPlayListAndClear())); 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); @@ -215,6 +217,10 @@ void PlayerWidget::createActions(){ connect(muteA, SIGNAL(triggered(bool)), this, SLOT(mute(bool))); QAction *configA = Globals::instance()->action(Globals::ConfigAction); mView->addAction(addToPlayListA); + mView->addAction(addToPlayListAndClearA); + QAction *mViewAS1 = new QAction(this); + mViewAS1->setSeparator(true); + mView->addAction(mViewAS1); mView->addAction(randomPlayA); mPlayListView->addAction(removeFromPlayListA); mPlayListView->addAction(shufflePlayistA); @@ -556,6 +562,11 @@ void PlayerWidget::addToPlayList(){ } } +void PlayerWidget::addToPlayListAndClear(){ + clearPlayList(); + addToPlayList(); +} + void PlayerWidget::removeFromPlayList(){ QModelIndexList sel = mPlayListView->selectionModel()->selectedRows(); QList<QPersistentModelIndex> persistent; diff --git a/playerwidget.h b/playerwidget.h index bc6ad81..e2ac24d 100644 --- a/playerwidget.h +++ b/playerwidget.h @@ -33,6 +33,7 @@ class PlayerWidget : public QWidget { void clearFilter(); void reindex(); void addToPlayList(); + void addToPlayListAndClear(); void removeFromPlayList(); void clearPlayList(); void shufflePlayList(); |