X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=gui%2Fmainwin.cpp;h=66b575480c506218af69440e1d1b18af53cb80f5;hp=db8de04e3c539fd8e0904fd2aa45a1ff4de495cb;hb=a7afccdbf779b959a4ce3fe88ec42590e3df6cfe;hpb=8ce468c06d1faa05bd5402caef3bd6f27d13240c diff --git a/gui/mainwin.cpp b/gui/mainwin.cpp index db8de04e..66b57548 100644 --- a/gui/mainwin.cpp +++ b/gui/mainwin.cpp @@ -19,6 +19,7 @@ ***************************************************************************/ #include +#include #include "global.h" @@ -32,6 +33,13 @@ MainWin::MainWin() : QMainWindow() { setWindowTitle("Quassel IRC"); setWindowIcon(QIcon(":/qirc-icon.png")); setWindowIconText("Quassel IRC"); + + QSettings s; + s.beginGroup("Geometry"); + resize(s.value("MainWinSize", QSize(500, 400)).toSize()); + move(s.value("MainWinPos", QPoint(50, 50)).toPoint()); + s.endGroup(); + //workspace = new QWorkspace(this); //setCentralWidget(workspace); //ChannelWidget *cw = new ChannelWidget(this); @@ -115,3 +123,16 @@ void MainWin::showServerList() { serverListDlg->show(); } +void MainWin::closeEvent(QCloseEvent *event) +{ + //if (userReallyWantsToQuit()) { + QSettings s; + s.beginGroup("Geometry"); + s.setValue("MainWinSize", size()); + s.setValue("MainWinPos", pos()); + s.endGroup(); + event->accept(); + //} else { + //event->ignore(); + //} +}