mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-23 16:11:41 +02:00
Added space bar shortcut to play/stop buttons
This commit is contained in:
parent
8639185333
commit
e38fc45e15
@ -17884,4 +17884,5 @@
|
||||
* Modified rdmonitor(1) to use QProcess to spawn rdselect(1).
|
||||
2018-10-22 Patrick Linstruth <patrick@deltecent.com>
|
||||
* Disable play/stop button focus in rdlibrary(1)
|
||||
* Added space bar shortcut to play/stop buttons in rdlibrary(1)
|
||||
* Fixed bug in cart validation after edit in rdlibrary(1)
|
||||
|
@ -38,6 +38,8 @@
|
||||
#include <q3progressdialog.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qstylefactory.h>
|
||||
#include <qkeysequence.h>
|
||||
#include <qshortcut.h>
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
@ -487,6 +489,8 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
lib_player->playButton()->setFocusPolicy(Qt::NoFocus);
|
||||
lib_player->stopButton()->setFocusPolicy(Qt::NoFocus);
|
||||
|
||||
QShortcut *lib_player_shortcut=new QShortcut(Qt::Key_Space,this);
|
||||
connect(lib_player_shortcut,SIGNAL(activated()),this,SLOT(playerShortcutData()));
|
||||
|
||||
//
|
||||
// Setup Signal Handling
|
||||
@ -629,6 +633,19 @@ void MainWidget::groupActivatedData(const QString &str)
|
||||
}
|
||||
|
||||
|
||||
void MainWidget::playerShortcutData()
|
||||
{
|
||||
if(lib_player->isPlaying()) {
|
||||
lib_player->stop();
|
||||
}
|
||||
else if(lib_player->playButton()->isEnabled()) {
|
||||
lib_player->play();
|
||||
}
|
||||
else if(lib_macro_button->isEnabled()) {
|
||||
macroData();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWidget::addData()
|
||||
{
|
||||
QString sql;
|
||||
@ -946,6 +963,7 @@ void MainWidget::cartClickedData()
|
||||
lib_player->stopButton()->setEnabled(false);
|
||||
lib_player->playButton()->setVisible(false);
|
||||
lib_player->stopButton()->setVisible(false);
|
||||
lib_player->stop();
|
||||
}
|
||||
else {
|
||||
lib_player->setCart(item->text(Cart));
|
||||
|
@ -88,6 +88,7 @@ class MainWidget : public QWidget
|
||||
void macroData();
|
||||
void ripData();
|
||||
void reportsData();
|
||||
void playerShortcutData();
|
||||
void cartOnItemData(Q3ListViewItem *item);
|
||||
void cartClickedData();
|
||||
void cartDoubleclickedData(Q3ListViewItem *,const QPoint &,int);
|
||||
|
Loading…
x
Reference in New Issue
Block a user