aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-22 21:06:51 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-22 21:06:51 +0800
commit446263beafeafa831530a6f9711aa891955b7db3 (patch)
tree00e9d55274580d413e6d88747d8fe7893cd69ac2 /qmidiplayer-desktop
parent7457599cb1bbf1d28b4b29bc12d07801b37ad410 (diff)
downloadQMidiPlayer-446263beafeafa831530a6f9711aa891955b7db3.tar.xz
First stable version!0.7.2-5
Remove visualization stub. Complain explicitly if an invalid file is loaded. Remove fluidsynth warnings from stderr.
Diffstat (limited to 'qmidiplayer-desktop')
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp5
-rw-r--r--qmidiplayer-desktop/qmpsettingswindow.ui161
-rw-r--r--qmidiplayer-desktop/translations/qmp_zh_CN.ts126
3 files changed, 56 insertions, 236 deletions
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index c04bc93..73c2895 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -6,6 +6,7 @@
#include <QFont>
#include <QDirIterator>
#include <QDesktopWidget>
+#include <QMessageBox>
#include "qmpmainwindow.hpp"
#include "ui_qmpmainwindow.h"
#include "../core/qmpmidiplay.hpp"
@@ -27,14 +28,14 @@ char* wcsto8bit(const wchar_t* s)
#define LOAD_FILE \
{\
char* c=wcsto8bit(fns.toStdWString().c_str());\
- if(!player->playerLoadFile(c)){free(c);return;}\
+ if(!player->playerLoadFile(c)){free(c);QMessageBox::critical(this,tr("Error"),tr("%1 is not a valid midi file.").arg(fns));return;}\
free(c);\
}
#else
#define LOAD_SOUNDFONT \
player->pushSoundFont(settingsw->getSFWidget()->item(i)->text().toStdString().c_str())
#define LOAD_FILE \
- if(!player->playerLoadFile(fns.toStdString().c_str()))return
+ if(!player->playerLoadFile(fns.toStdString().c_str())){QMessageBox::critical(this,tr("Error"),tr("%1 is not a valid midi file.").arg(fns));return;}
#endif
#define UPDATE_INTERVAL 66
diff --git a/qmidiplayer-desktop/qmpsettingswindow.ui b/qmidiplayer-desktop/qmpsettingswindow.ui
index 0baa694..96d0a43 100644
--- a/qmidiplayer-desktop/qmpsettingswindow.ui
+++ b/qmidiplayer-desktop/qmpsettingswindow.ui
@@ -562,167 +562,6 @@
</property>
</widget>
</item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLabel" name="lbVisualMode">
- <property name="text">
- <string>Visualization Mode</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="cbVisualMode"/>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <widget class="QLabel" name="lbViewDist">
- <property name="text">
- <string>View distance</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>50</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QSlider" name="hsViewDist">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>60</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>250</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="sbViewDist"/>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_4">
- <item>
- <widget class="QLabel" name="lbNoteStretch">
- <property name="text">
- <string>Note stretch</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>60</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QSlider" name="hsNoteStretch">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>60</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>250</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="sbNoteStretch"/>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_5">
- <item>
- <widget class="QLabel" name="lbFog">
- <property name="text">
- <string>Fog Start</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>82</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QSlider" name="hsFog">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>60</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>250</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="sbFog"/>
- </item>
- </layout>
- </item>
</layout>
</widget>
</widget>
diff --git a/qmidiplayer-desktop/translations/qmp_zh_CN.ts b/qmidiplayer-desktop/translations/qmp_zh_CN.ts
index d834231..8d313d2 100644
--- a/qmidiplayer-desktop/translations/qmp_zh_CN.ts
+++ b/qmidiplayer-desktop/translations/qmp_zh_CN.ts
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.0" language="zh_CN">
+<TS version="2.1" language="zh_CN">
<context>
<name>qmpChannelEditor</name>
<message>
@@ -9,117 +9,117 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="38"/>
+ <location filename="../qmpchanneleditor.ui" line="53"/>
<source>&lt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="51"/>
+ <location filename="../qmpchanneleditor.ui" line="66"/>
<source>1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="67"/>
+ <location filename="../qmpchanneleditor.ui" line="88"/>
<source>&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="85"/>
+ <location filename="../qmpchanneleditor.ui" line="124"/>
<source>Yamaha Grand Piano</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="98"/>
+ <location filename="../qmpchanneleditor.ui" line="97"/>
<source>BK: 0</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="111"/>
+ <location filename="../qmpchanneleditor.ui" line="104"/>
<source>PC: 0</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="124"/>
+ <location filename="../qmpchanneleditor.ui" line="135"/>
<source>Filters</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="136"/>
+ <location filename="../qmpchanneleditor.ui" line="192"/>
<source>Res. 64</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="190"/>
+ <location filename="../qmpchanneleditor.ui" line="182"/>
<source>Cut. 64</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="207"/>
+ <location filename="../qmpchanneleditor.ui" line="205"/>
<source>Effects</source>
<translation type="unfinished">效果</translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="219"/>
+ <location filename="../qmpchanneleditor.ui" line="262"/>
<source>Chr. 64</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="273"/>
+ <location filename="../qmpchanneleditor.ui" line="252"/>
<source>Rev. 64</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="290"/>
+ <location filename="../qmpchanneleditor.ui" line="349"/>
<source>Envelope</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="302"/>
+ <location filename="../qmpchanneleditor.ui" line="419"/>
<source>Dec. 64</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="356"/>
+ <location filename="../qmpchanneleditor.ui" line="409"/>
<source>Atk. 64</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="391"/>
+ <location filename="../qmpchanneleditor.ui" line="429"/>
<source>Rel. 64</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="408"/>
+ <location filename="../qmpchanneleditor.ui" line="442"/>
<source>Vibrato</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="420"/>
+ <location filename="../qmpchanneleditor.ui" line="512"/>
<source>Dep. 64</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="474"/>
+ <location filename="../qmpchanneleditor.ui" line="502"/>
<source>Rate 64</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="509"/>
+ <location filename="../qmpchanneleditor.ui" line="522"/>
<source>Del. 64</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="526"/>
+ <location filename="../qmpchanneleditor.ui" line="275"/>
<source>Mixer</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="538"/>
+ <location filename="../qmpchanneleditor.ui" line="332"/>
<source>Pan. C</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpchanneleditor.ui" line="573"/>
+ <location filename="../qmpchanneleditor.ui" line="322"/>
<source>Vol. 127</source>
<translation type="unfinished"></translation>
</message>
@@ -320,63 +320,63 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpmainwindow.ui" line="54"/>
+ <location filename="../qmpmainwindow.ui" line="84"/>
<source>somefile.mid</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpmainwindow.ui" line="210"/>
+ <location filename="../qmpmainwindow.ui" line="126"/>
+ <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Poly&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
+ <translation type="unfinished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;复音&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+ </message>
+ <message>
+ <location filename="../qmpmainwindow.ui" line="390"/>
<source>Channels</source>
<translation type="unfinished">通道</translation>
</message>
<message>
- <location filename="../qmpmainwindow.ui" line="239"/>
+ <location filename="../qmpmainwindow.ui" line="419"/>
<source>Playlist</source>
<translation type="unfinished">播放列表</translation>
</message>
<message>
- <location filename="../qmpmainwindow.ui" line="274"/>
+ <location filename="../qmpmainwindow.ui" line="454"/>
<source>Effects</source>
<translation type="unfinished">效果</translation>
</message>
<message>
- <location filename="../qmpmainwindow.ui" line="303"/>
+ <location filename="../qmpmainwindow.ui" line="483"/>
<source>Visualization</source>
<translation type="unfinished">可视化</translation>
</message>
<message>
- <location filename="../qmpmainwindow.ui" line="326"/>
- <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Poly: 0/0&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../qmpmainwindow.ui" line="361"/>
+ <location filename="../qmpmainwindow.ui" line="539"/>
<source>Master</source>
<translation type="unfinished">主音量</translation>
</message>
<message>
- <location filename="../qmpmainwindow.ui" line="374"/>
- <location filename="../qmpmainwindow.ui" line="387"/>
+ <location filename="../qmpmainwindow.ui" line="105"/>
+ <location filename="../qmpmainwindow.ui" line="163"/>
<source>00:00</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpmainwindow.ui" line="403"/>
+ <location filename="../qmpmainwindow.ui" line="46"/>
<source>?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../qmpmainwindow.cpp" line="68"/>
+ <location filename="../qmpmainwindow.cpp" line="72"/>
<source>File Information</source>
<translation type="unfinished">文件信息</translation>
</message>
<message>
- <location filename="../qmpmainwindow.cpp" line="69"/>
+ <location filename="../qmpmainwindow.cpp" line="73"/>
<source>Render to Wave</source>
<translation type="unfinished">输出到wav文件</translation>
</message>
<message>
- <location filename="../qmpmainwindow.cpp" line="70"/>
+ <location filename="../qmpmainwindow.cpp" line="74"/>
<source>Panic</source>
<translation type="unfinished">关闭所有音符</translation>
</message>
@@ -389,46 +389,46 @@
<translation type="unfinished">播放列表</translation>
</message>
<message>
- <location filename="../qmpplistwindow.ui" line="44"/>
+ <location filename="../qmpplistwindow.ui" line="97"/>
<source>Add</source>
<translation type="unfinished">添加</translation>
</message>
<message>
- <location filename="../qmpplistwindow.ui" line="70"/>
+ <location filename="../qmpplistwindow.ui" line="225"/>
<source>Add Folder</source>
<translation type="unfinished">添加文件夹</translation>
</message>
<message>
- <location filename="../qmpplistwindow.ui" line="96"/>
+ <location filename="../qmpplistwindow.ui" line="161"/>
<location filename="../qmpplistwindow.cpp" line="188"/>
<location filename="../qmpplistwindow.cpp" line="296"/>
<source>Repeat Off</source>
<translation type="unfinished">循环关</translation>
</message>
<message>
- <location filename="../qmpplistwindow.ui" line="122"/>
+ <location filename="../qmpplistwindow.ui" line="257"/>
<location filename="../qmpplistwindow.cpp" line="213"/>
<location filename="../qmpplistwindow.cpp" line="289"/>
<source>Shuffle Off</source>
<translation type="unfinished">随机关</translation>
</message>
<message>
- <location filename="../qmpplistwindow.ui" line="148"/>
+ <location filename="../qmpplistwindow.ui" line="65"/>
<source>Save</source>
<translation type="unfinished">保存列表</translation>
</message>
<message>
- <location filename="../qmpplistwindow.ui" line="174"/>
+ <location filename="../qmpplistwindow.ui" line="129"/>
<source>Load</source>
<translation type="unfinished">加载列表</translation>
</message>
<message>
- <location filename="../qmpplistwindow.ui" line="200"/>
+ <location filename="../qmpplistwindow.ui" line="193"/>
<source>Remove</source>
<translation type="unfinished">移除</translation>
</message>
<message>
- <location filename="../qmpplistwindow.ui" line="226"/>
+ <location filename="../qmpplistwindow.ui" line="289"/>
<source>Clear</source>
<translation type="unfinished">清空</translation>
</message>
@@ -469,22 +469,22 @@
<translation type="unfinished">乐器选择</translation>
</message>
<message>
- <location filename="../qmppresetselect.ui" line="61"/>
+ <location filename="../qmppresetselect.ui" line="39"/>
<source>Bank</source>
<translation type="unfinished">乐器库</translation>
</message>
<message>
- <location filename="../qmppresetselect.ui" line="74"/>
+ <location filename="../qmppresetselect.ui" line="66"/>
<source>Preset</source>
<translation type="unfinished">乐器</translation>
</message>
<message>
- <location filename="../qmppresetselect.ui" line="87"/>
+ <location filename="../qmppresetselect.ui" line="114"/>
<source>OK</source>
<translation type="unfinished">确定</translation>
</message>
<message>
- <location filename="../qmppresetselect.ui" line="100"/>
+ <location filename="../qmppresetselect.ui" line="101"/>
<source>Cancel</source>
<translation type="unfinished">取消</translation>
</message>
@@ -787,25 +787,5 @@
<source>Persistent fluidsynth instance</source>
<translation type="unfinished">单一fluidsynth实例</translation>
</message>
- <message>
- <location filename="../qmpsettingswindow.ui" line="570"/>
- <source>Visualization Mode</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../qmpsettingswindow.ui" line="584"/>
- <source>View distance</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../qmpsettingswindow.ui" line="627"/>
- <source>Note stretch</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../qmpsettingswindow.ui" line="670"/>
- <source>Fog Start</source>
- <translation type="unfinished"></translation>
- </message>
</context>
</TS>