diff options
author | Chris Xiong <chirs241097@gmail.com> | 2017-02-13 17:31:42 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2017-02-13 17:31:42 +0800 |
commit | a0da9bca472043e7f13d4d6ea1809f6b63a598b0 (patch) | |
tree | f318a37656b5b25c4028739b8e59ebb4d132d34d /qmidiplayer-desktop/qmpefxwindow.cpp | |
parent | 3312e495cf54a8bd6451552216f5aeea1a06d486 (diff) | |
download | QMidiPlayer-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/qmpefxwindow.cpp')
-rw-r--r-- | qmidiplayer-desktop/qmpefxwindow.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/qmidiplayer-desktop/qmpefxwindow.cpp b/qmidiplayer-desktop/qmpefxwindow.cpp index 507880e..6546547 100644 --- a/qmidiplayer-desktop/qmpefxwindow.cpp +++ b/qmidiplayer-desktop/qmpefxwindow.cpp @@ -36,8 +36,8 @@ qmpEfxWindow::qmpEfxWindow(QWidget *parent) : 0, true ); - if(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxW",QByteArray()).toByteArray().length()) - restoreGeometry(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxW",QRect(-999,-999,-999,-999)).toByteArray()); + if(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxW",QRect(-999,-999,999,999)).toRect()!=QRect(-999,-999,999,999)) + setGeometry(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxW",QRect(-999,-999,999,999)).toRect()); if(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxWShown",0).toInt()) {show();qmpMainWindow::getInstance()->setFuncState("Effects",true);} } @@ -52,6 +52,10 @@ qmpEfxWindow::~qmpEfxWindow() void qmpEfxWindow::closeEvent(QCloseEvent *event) { + if(qmpSettingsWindow::getSettingsIntf()->value("Behavior/DialogStatus","").toInt()) + { + qmpSettingsWindow::getSettingsIntf()->setValue("DialogStatus/EfxW",geometry()); + } setVisible(false); if(!qmpMainWindow::getInstance()->isFinalizing()&&qmpSettingsWindow::getSettingsIntf()->value("Behavior/DialogStatus","").toInt()) { @@ -82,8 +86,8 @@ void qmpEfxWindow::showEvent(QShowEvent *event) if(ct==FLUID_CHORUS_MOD_SINE)ui->rbSine->setChecked(true),ui->rbTriangle->setChecked(false); if(ct==FLUID_CHORUS_MOD_TRIANGLE)ui->rbSine->setChecked(false),ui->rbTriangle->setChecked(true); initialized=true; - if(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxW",QByteArray()).toByteArray().length()) - restoreGeometry(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxW",QRect(-999,-999,-999,-999)).toByteArray()); + if(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxW",QRect(-999,-999,999,999)).toRect()!=QRect(-999,-999,999,999)) + setGeometry(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxW",QRect(-999,-999,999,999)).toRect()); if(qmpSettingsWindow::getSettingsIntf()->value("Behavior/DialogStatus","").toInt()) { qmpSettingsWindow::getSettingsIntf()->setValue("DialogStatus/EfxWShown",1); @@ -91,15 +95,6 @@ void qmpEfxWindow::showEvent(QShowEvent *event) event->accept(); } -void qmpEfxWindow::moveEvent(QMoveEvent *event) -{ - if(qmpSettingsWindow::getSettingsIntf()->value("Behavior/DialogStatus","").toInt()) - { - qmpSettingsWindow::getSettingsIntf()->setValue("DialogStatus/EfxW",saveGeometry()); - } - event->accept(); -} - void qmpEfxWindow::sendEfxChange() { if(!qmpMainWindow::getInstance()||!initialized)return; |