aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop
diff options
context:
space:
mode:
Diffstat (limited to 'qmidiplayer-desktop')
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp12
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.hpp3
-rw-r--r--qmidiplayer-desktop/translations/qmp_zh_CN.ts15
3 files changed, 27 insertions, 3 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();
diff --git a/qmidiplayer-desktop/qmpmainwindow.hpp b/qmidiplayer-desktop/qmpmainwindow.hpp
index e17a792..729eb7f 100644
--- a/qmidiplayer-desktop/qmpmainwindow.hpp
+++ b/qmidiplayer-desktop/qmpmainwindow.hpp
@@ -57,6 +57,7 @@ class qmpMainWindow:public QMainWindow
void on_pbSettings_clicked();
void onfnA1();
void onfnA2();
+ void onfnA3();
void on_pushButton_clicked();
@@ -80,7 +81,7 @@ class qmpMainWindow:public QMainWindow
qmpSettingsWindow *settingsw;
qmpHelpWindow *helpw;
- QAction *fnA1,*fnA2;
+ QAction *fnA1,*fnA2,*fnA3;
void playerSetup();
private:
diff --git a/qmidiplayer-desktop/translations/qmp_zh_CN.ts b/qmidiplayer-desktop/translations/qmp_zh_CN.ts
index 4810b05..d834231 100644
--- a/qmidiplayer-desktop/translations/qmp_zh_CN.ts
+++ b/qmidiplayer-desktop/translations/qmp_zh_CN.ts
@@ -365,6 +365,21 @@
<source>?</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="../qmpmainwindow.cpp" line="68"/>
+ <source>File Information</source>
+ <translation type="unfinished">文件信息</translation>
+ </message>
+ <message>
+ <location filename="../qmpmainwindow.cpp" line="69"/>
+ <source>Render to Wave</source>
+ <translation type="unfinished">输出到wav文件</translation>
+ </message>
+ <message>
+ <location filename="../qmpmainwindow.cpp" line="70"/>
+ <source>Panic</source>
+ <translation type="unfinished">关闭所有音符</translation>
+ </message>
</context>
<context>
<name>qmpPlistWindow</name>