From 84634010422f578b27105bbbaf6b8ee4c1232e86 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sun, 3 Jan 2016 23:15:41 +0800 Subject: Bad Apple. (WTF) --- qmpchannelswindow.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'qmpchannelswindow.cpp') 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) -- cgit v1.2.3