aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpmainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2017-02-13 17:31:42 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2017-02-13 17:31:42 +0800
commita0da9bca472043e7f13d4d6ea1809f6b63a598b0 (patch)
treef318a37656b5b25c4028739b8e59ebb4d132d34d /qmidiplayer-desktop/qmpmainwindow.cpp
parent3312e495cf54a8bd6451552216f5aeea1a06d486 (diff)
downloadQMidiPlayer-a0da9bca472043e7f13d4d6ea1809f6b63a598b0.tar.xz
Fix pitch bend range handling.
Allow registering a string option as file path. Provide an easier way to set path values in options. Revert to old geometry storage mechanism and improved it. Hope this one will work on Windows. Make the time slider less ugly.
Diffstat (limited to 'qmidiplayer-desktop/qmpmainwindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index fc7f850..12fa2a1 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -121,7 +121,7 @@ void qmpMainWindow::init()
ui->pbSettings->setIcon(QIcon(getThemedIcon(":/img/settings.svg")));
ui->pbAdd->setIcon(QIcon(getThemedIcon(":/img/open.svg")));
if(havemidi)on_pbPlayPause_clicked();
- setupWidget();
+ setupWidget();settingsw->verifySF();
}
int qmpMainWindow::pharseArgs()
@@ -437,8 +437,8 @@ void qmpMainWindow::on_hsTimer_sliderReleased()
if(playing)
{
if(ui->hsTimer->value()==100){on_pbNext_clicked();return;}
- player->setTCeptr(player->getStamp(ui->hsTimer->value()),ui->hsTimer->value());
player->playerPanic();
+ player->setTCeptr(player->getStamp(ui->hsTimer->value()),ui->hsTimer->value());
offset=ui->hsTimer->value()/100.*player->getFtime();
st=std::chrono::steady_clock::now();
}
@@ -461,8 +461,8 @@ void qmpMainWindow::playerSeek(uint32_t percentage)
if(playing)
{
if(percentage==100){on_pbNext_clicked();return;}
- player->setTCeptr(player->getStamp(percentage),percentage);
player->playerPanic();ui->hsTimer->setValue(percentage);
+ player->setTCeptr(player->getStamp(percentage),percentage);
offset=percentage/100.*player->getFtime();
st=std::chrono::steady_clock::now();
}
@@ -630,6 +630,7 @@ void qmpMainWindow::setupWidget()
}
for(unsigned i=0;i<enabled_buttons.size();++i)
{
+ if(mfunc.find(enabled_buttons[i])==mfunc.end())continue;
QReflectivePushButton *pb=new QReflectivePushButton(
mfunc[enabled_buttons[i]].icon(),
tr(mfunc[enabled_buttons[i]].desc().c_str()),
@@ -649,6 +650,7 @@ void qmpMainWindow::setupWidget()
}
for(unsigned i=0;i<enabled_actions.size();++i)
{
+ if(mfunc.find(enabled_actions[i])==mfunc.end())continue;
QReflectiveAction *a=new QReflectiveAction(
mfunc[enabled_actions[i]].icon(),
tr(mfunc[enabled_actions[i]].desc().c_str()),