summaryrefslogtreecommitdiffstats
path: root/playerwidget.cpp
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2018-08-25 07:58:43 +0200
committerArno <arno@disconnect.de>2018-08-25 07:58:43 +0200
commit36d643da276a90ed8c8fc920d3e6a150d0bfc809 (patch)
treedce1c4543e2ad2c671dd95be9514bc0cbbb82c56 /playerwidget.cpp
parent295114f77a4ed6ed8957485c0ceaf5c6d38b3485 (diff)
downloadBeetPlayer-36d643da276a90ed8c8fc920d3e6a150d0bfc809.tar.gz
BeetPlayer-36d643da276a90ed8c8fc920d3e6a150d0bfc809.tar.bz2
BeetPlayer-36d643da276a90ed8c8fc920d3e6a150d0bfc809.zip
Create keyboard Shortcuts for Views
In order of the bottom Icons: Alt+1 = Artist, Alt+6 = Folder
Diffstat (limited to 'playerwidget.cpp')
-rw-r--r--playerwidget.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/playerwidget.cpp b/playerwidget.cpp
index 4564b35..02b5354 100644
--- a/playerwidget.cpp
+++ b/playerwidget.cpp
@@ -81,8 +81,8 @@ void PlayerWidget::setupGui(QSplashScreen *splash){
//THE views
QToolBar *bottomTB = new QToolBar;
- QActionGroup *bottomTBG = new QActionGroup(this);
- bottomTBG->setExclusive(true);
+ mBottomTBG = new QActionGroup(this);
+ mBottomTBG->setExclusive(true);
mCollectionStack = new QStackedWidget;
//artists view
CollectionArtistsView *artistsView = new CollectionArtistsView;
@@ -95,7 +95,7 @@ void PlayerWidget::setupGui(QSplashScreen *splash){
QAction *viewByArtistsA = new QAction(QIcon(":/artist.png"), tr("View by artist"), this);
viewByArtistsA->setCheckable(true);
connect(viewByArtistsA, &QAction::triggered, [this, cIdx] { setCollectionIndex(cIdx, false); });
- bottomTBG->addAction(viewByArtistsA);
+ mBottomTBG->addAction(viewByArtistsA);
//albums view
CollectionAlbumsView *albumsView = new CollectionAlbumsView;
albumsView->setHeaders(QStringList() << tr("Album"));
@@ -107,7 +107,7 @@ void PlayerWidget::setupGui(QSplashScreen *splash){
mViewByAlbumsA = new QAction(QIcon(":/album.png"), tr("View by album"), this);
mViewByAlbumsA->setCheckable(true);
connect(mViewByAlbumsA, &QAction::triggered, [this, cIdx] { setCollectionIndex(cIdx, false); });
- bottomTBG->addAction(mViewByAlbumsA);
+ mBottomTBG->addAction(mViewByAlbumsA);
//dates view
CollectionDatesView *datesView = new CollectionDatesView;;
datesView->setHeaders(QStringList() << tr("Date added"));
@@ -119,7 +119,7 @@ void PlayerWidget::setupGui(QSplashScreen *splash){
QAction *viewByDatesA = new QAction(QIcon(":/sissyd.png"), tr("View by date"), this);
viewByDatesA->setCheckable(true);
connect(viewByDatesA, &QAction::triggered, [this, cIdx] { setCollectionIndex(cIdx, false); });
- bottomTBG->addAction(viewByDatesA);
+ mBottomTBG->addAction(viewByDatesA);
//favorites view
CollectionFavoritesView *favoritesView = new CollectionFavoritesView;
favoritesView->setHeaders(QStringList() << tr("Song"));
@@ -131,7 +131,7 @@ void PlayerWidget::setupGui(QSplashScreen *splash){
QAction *viewByFavoritesA = new QAction(QIcon(":/male_chastity_belt.png"), tr("View by favorites"), this);
viewByFavoritesA->setCheckable(true);
connect(viewByFavoritesA, &QAction::triggered, [this, cIdx] { setCollectionIndex(cIdx, false); });
- bottomTBG->addAction(viewByFavoritesA);
+ mBottomTBG->addAction(viewByFavoritesA);
//webradio view
CollectionWebradioView *webradioView = new CollectionWebradioView;
webradioView->setHeaders(QStringList() << tr("Webradio"));
@@ -143,7 +143,7 @@ void PlayerWidget::setupGui(QSplashScreen *splash){
QAction *viewByWebradioA = new QAction(QIcon(":/dog_hood.png"), tr("Webradio"), this);
viewByWebradioA->setCheckable(true);
connect(viewByWebradioA, &QAction::triggered, [this, cIdx] { setCollectionIndex(cIdx, true); });
- bottomTBG->addAction(viewByWebradioA);
+ mBottomTBG->addAction(viewByWebradioA);
//folders view
CollectionFoldersView *foldersView = new CollectionFoldersView;
foldersView->setHeaders(QStringList() << tr("Folder contents"));
@@ -155,8 +155,8 @@ void PlayerWidget::setupGui(QSplashScreen *splash){
QAction *viewByFoldersA = new QAction(QIcon(":/folder.png"), tr("View by folder"), this);
viewByFoldersA->setCheckable(true);
connect(viewByFoldersA, &QAction::triggered, [this, cIdx] { setCollectionIndex(cIdx, false); });
- bottomTBG->addAction(viewByFoldersA);
- for(QAction *a : bottomTBG->actions()){
+ mBottomTBG->addAction(viewByFoldersA);
+ for(QAction *a : mBottomTBG->actions()){
bottomTB->addAction(a);
}
for(int i = 0; i < mCollectionStack->count(); ++i){