]> git.sur5r.net Git - minitube/commitdiff
Keyboard shortcuts for the sortBar
authorFlavio Tordini <flavio.tordini@gmail.com>
Thu, 13 Aug 2009 17:22:56 +0000 (19:22 +0200)
committerFlavio Tordini <flavio.tordini@gmail.com>
Thu, 13 Aug 2009 17:22:56 +0000 (19:22 +0200)
Ctrl+1, Ctrl+2, Ctrl+3

src/MediaView.cpp

index cee7f6242c4b88846e2539c5b2dc70ca76580ea9..10160658c224238c83653f67b877bfbff215d680 100644 (file)
@@ -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);