aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpmainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-18 23:34:22 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-18 23:34:22 +0800
commit41d78f3a67e2356008911b07f8cc0d0cdafd7fda (patch)
treef9ab616fb25b718b4299b15b90e54c86cb131161 /qmidiplayer-desktop/qmpmainwindow.cpp
parentb21f97f416cea5d9d86e3b28bd797b42491fc5a9 (diff)
downloadQMidiPlayer-41d78f3a67e2356008911b07f8cc0d0cdafd7fda.tar.xz
Use std::vector for the event list. Add panic action.
Minor changes on the panic function.
Diffstat (limited to 'qmidiplayer-desktop/qmpmainwindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index b01df10..82537d2 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -65,10 +65,12 @@ void qmpMainWindow::init()
infow=new qmpInfoWindow(this);
helpw=new qmpHelpWindow(this);
timer=new QTimer(this);
- fnA1=new QAction("File Information",ui->lbFileName);
- fnA2=new QAction("Render to Wave",ui->lbFileName);
+ fnA1=new QAction(tr("File Information"),ui->lbFileName);
+ fnA2=new QAction(tr("Render to Wave"),ui->lbFileName);
+ fnA3=new QAction(tr("Panic"),ui->lbFileName);
ui->lbFileName->addAction(fnA1);
ui->lbFileName->addAction(fnA2);
+ ui->lbFileName->addAction(fnA3);
if(singleFS){player->fluidPreInitialize();playerSetup();player->fluidInitialize();
for(int i=settingsw->getSFWidget()->count()-1;i>=0;--i)
LOAD_SOUNDFONT;}
@@ -90,6 +92,7 @@ void qmpMainWindow::init()
ui->vsMasterVol->setValue(qmpSettingsWindow::getSettingsIntf()->value("Audio/Gain",50).toInt());
connect(fnA1,SIGNAL(triggered()),this,SLOT(onfnA1()));
connect(fnA2,SIGNAL(triggered()),this,SLOT(onfnA2()));
+ connect(fnA3,SIGNAL(triggered()),this,SLOT(onfnA3()));
connect(timer,SIGNAL(timeout()),this,SLOT(updateWidgets()));
connect(timer,SIGNAL(timeout()),chnlw,SLOT(channelWindowsUpdate()));
connect(timer,SIGNAL(timeout()),infow,SLOT(updateInfo()));
@@ -544,6 +547,11 @@ void qmpMainWindow::onfnA2()
renderTh=new std::thread(&CMidiPlayer::rendererThread,player);
}
+void qmpMainWindow::onfnA3()
+{
+ player->playerPanic();
+}
+
void qmpMainWindow::on_pbSettings_clicked()
{
if(ui->pbSettings->isChecked())settingsw->show();else settingsw->close();