aboutsummaryrefslogtreecommitdiff
path: root/qmpchannelswindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-01-03 23:15:41 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-01-03 23:15:41 +0800
commit84634010422f578b27105bbbaf6b8ee4c1232e86 (patch)
tree022775f88c94d697bdce0b32ae32698c542b50ca /qmpchannelswindow.cpp
parentb886aa1fcafc16fe93bfe19e2f63b4089234f9f6 (diff)
downloadQMidiPlayer-84634010422f578b27105bbbaf6b8ee4c1232e86.tar.xz
Bad Apple. (WTF)
Diffstat (limited to 'qmpchannelswindow.cpp')
-rw-r--r--qmpchannelswindow.cpp21
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)