From: Flavio Tordini Date: Thu, 13 Aug 2009 17:22:56 +0000 (+0200) Subject: Keyboard shortcuts for the sortBar X-Git-Tag: 0.6~57 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2a60b737c72fc6799f78c548328281c257375549;p=minitube Keyboard shortcuts for the sortBar Ctrl+1, Ctrl+2, Ctrl+3 --- diff --git a/src/MediaView.cpp b/src/MediaView.cpp index cee7f62..1016065 100644 --- a/src/MediaView.cpp +++ b/src/MediaView.cpp @@ -20,12 +20,18 @@ MediaView::MediaView(QWidget *parent) : QWidget(parent) { sortBar = new THBlackBar(this); mostRelevantAction = new QAction(tr("Most relevant"), this); + mostRelevantAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_1)); + addAction(mostRelevantAction); connect(mostRelevantAction, SIGNAL(triggered()), this, SLOT(searchMostRelevant()), Qt::QueuedConnection); sortBar->addAction(mostRelevantAction); mostRecentAction = new QAction(tr("Most recent"), this); + mostRecentAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_2)); + addAction(mostRecentAction); connect(mostRecentAction, SIGNAL(triggered()), this, SLOT(searchMostRecent()), Qt::QueuedConnection); sortBar->addAction(mostRecentAction); mostViewedAction = new QAction(tr("Most viewed"), this); + mostViewedAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_3)); + addAction(mostViewedAction); connect(mostViewedAction, SIGNAL(triggered()), this, SLOT(searchMostViewed()), Qt::QueuedConnection); sortBar->addAction(mostViewedAction);