aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-05-18 23:58:40 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-05-18 23:58:40 +0800
commit8ef9703ee2a4b22395935030606fcf69e3acad86 (patch)
treeafebccb5bc50afeed0291569cab993fddafd4d34 /qmidiplayer-desktop
parent473470054a4f67c67fb3f40a0438e87aff68703c (diff)
downloadQMidiPlayer-8ef9703ee2a4b22395935030606fcf69e3acad86.tar.xz
Finally finish the particle system integration.
Add std::wstring version APIs to avoid wrong encoding. Update documentation.
Diffstat (limited to 'qmidiplayer-desktop')
-rwxr-xr-xqmidiplayer-desktop/qmidiplayer.desktop2
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp8
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.hpp1
-rw-r--r--qmidiplayer-desktop/qmpplugin.cpp2
4 files changed, 12 insertions, 1 deletions
diff --git a/qmidiplayer-desktop/qmidiplayer.desktop b/qmidiplayer-desktop/qmidiplayer.desktop
index b49113f..2884d18 100755
--- a/qmidiplayer-desktop/qmidiplayer.desktop
+++ b/qmidiplayer-desktop/qmidiplayer.desktop
@@ -2,7 +2,7 @@
[Desktop Entry]
Type=Application
Name=QMidiPlayer
-Version=0.7.2
+Version=0.8.1
GenericName=MIDI Player
Comment=QMidiPlayer is a midi file player based on Fluidsynth and Qt.
Exec=/usr/bin/qmidiplayer
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index ed3c884..f634375 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -306,6 +306,14 @@ std::string qmpMainWindow::getTitle()
toString().toStdString().c_str())->
toUnicode(player->getTitle()).toStdString();
}
+std::wstring qmpMainWindow::getWTitle()
+{
+ if(!qmpSettingsWindow::getSettingsIntf())return L"";
+ return QTextCodec::codecForName(
+ qmpSettingsWindow::getSettingsIntf()->value("Midi/TextEncoding","").
+ toString().toStdString().c_str())->
+ toUnicode(player->getTitle()).toStdWString();
+}
void qmpMainWindow::playerSetup()
{
diff --git a/qmidiplayer-desktop/qmpmainwindow.hpp b/qmidiplayer-desktop/qmpmainwindow.hpp
index bf55fb9..9fc5d14 100644
--- a/qmidiplayer-desktop/qmpmainwindow.hpp
+++ b/qmidiplayer-desktop/qmpmainwindow.hpp
@@ -63,6 +63,7 @@ class qmpMainWindow:public QMainWindow
bool isFinalizing(){return fin;}
QString getFileName();
std::string getTitle();
+ std::wstring getWTitle();
int pharseArgs();
int registerVisualizationIntf(qmpVisualizationIntf* intf);
void unregisterVisualizationIntf(int handle);
diff --git a/qmidiplayer-desktop/qmpplugin.cpp b/qmidiplayer-desktop/qmpplugin.cpp
index ef31472..22cb696 100644
--- a/qmidiplayer-desktop/qmpplugin.cpp
+++ b/qmidiplayer-desktop/qmpplugin.cpp
@@ -113,6 +113,8 @@ bool qmpPluginAPI::getChannelMask(int ch)
{return qmw&&qmw->getPlayer()?qmw->getPlayer()->getChannelMask(ch):false;}
std::string qmpPluginAPI::getTitle()
{return qmw?qmw->getTitle():"";}
+std::wstring qmpPluginAPI::getWTitle()
+{return qmw?qmw->getWTitle():L"";}
std::string qmpPluginAPI::getChannelPresetString(int ch)
{
int b,p;char nm[25],ret[33];ret[0]=0;