diff options
author | Chris Xiong <chirs241097@gmail.com> | 2016-01-03 23:15:41 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2016-01-03 23:15:41 +0800 |
commit | 84634010422f578b27105bbbaf6b8ee4c1232e86 (patch) | |
tree | 022775f88c94d697bdce0b32ae32698c542b50ca /qmpchannelswindow.cpp | |
parent | b886aa1fcafc16fe93bfe19e2f63b4089234f9f6 (diff) | |
download | QMidiPlayer-84634010422f578b27105bbbaf6b8ee4c1232e86.tar.xz |
Bad Apple. (WTF)
Diffstat (limited to 'qmpchannelswindow.cpp')
-rw-r--r-- | qmpchannelswindow.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/qmpchannelswindow.cpp b/qmpchannelswindow.cpp index b73f71b..448e5b7 100644 --- a/qmpchannelswindow.cpp +++ b/qmpchannelswindow.cpp @@ -37,13 +37,34 @@ qmpChannelsWindow::qmpChannelsWindow(QWidget *parent) : ui->twChannels->setColumnWidth(4,32); } +void qmpChannelsWindow::showEvent(QShowEvent *event) +{ + if(qmpSettingsWindow::getSettingsIntf()->value("Behavior/DialogStatus","").toInt()) + { + qmpSettingsWindow::getSettingsIntf()->setValue("DialogStatus/ChnlWShown",1); + } + event->accept(); +} + void qmpChannelsWindow::closeEvent(QCloseEvent *event) { setVisible(false); + if(!qmpMainWindow::getInstance()->isFinalizing()&&qmpSettingsWindow::getSettingsIntf()->value("Behavior/DialogStatus","").toInt()) + { + qmpSettingsWindow::getSettingsIntf()->setValue("DialogStatus/ChnlWShown",0); + } emit dialogClosing(); event->accept(); } +void qmpChannelsWindow::moveEvent(QMoveEvent *event) +{ + if(qmpSettingsWindow::getSettingsIntf()->value("Behavior/DialogStatus","").toInt()) + { + qmpSettingsWindow::getSettingsIntf()->setValue("DialogStatus/ChnlW",event->pos()); + } +} + void qmpChannelsWindow::channelWindowsUpdate() { for(int i=0;i<16;++i) |