summaryrefslogtreecommitdiffstats
path: root/shemovcleaner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'shemovcleaner.cpp')
-rw-r--r--shemovcleaner.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/shemovcleaner.cpp b/shemovcleaner.cpp
index 59653ae..ac60fb8 100644
--- a/shemovcleaner.cpp
+++ b/shemovcleaner.cpp
@@ -10,6 +10,7 @@
#include <QSqlDatabase>
#include <QMessageBox>
#include <QTreeView>
+#include <QSettings>
#include "shemovcleaner.h"
#include "torrentwidget.h"
@@ -35,6 +36,9 @@ ShemovCleaner::ShemovCleaner(QWidget *parent, Qt::WindowFlags f) : QMainWindow(p
createActions();
connect(mTorrentTab, SIGNAL(statusMessage(QString)), this, SLOT(statusBarMessage(QString)));
connect(mTorrentTab, SIGNAL(selectionCountChanged(QString)), this, SLOT(setSelectionCount(QString)));
+
+ QSettings s;
+ restoreGeometry(s.value("geometry").toByteArray());
}
void ShemovCleaner::statusBarMessage(const QString &msg){
@@ -53,6 +57,12 @@ void ShemovCleaner::configure(){
}
}
+void ShemovCleaner::closeEvent(QCloseEvent *e){
+ QSettings s;
+ s.setValue("geometry", saveGeometry());
+ QMainWindow::closeEvent(e);
+}
+
void ShemovCleaner::createStatusBar(){
QLabel *l1 = new QLabel(tr("Sel."));
mSelected = new QLabel("000/000");