diff src/mainwindow.cpp @ 53:a43d8cf2fa95

Various fixes and improvements. Fix windows packaging.
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 19 Jul 2016 17:45:57 +0200
parents 36ee5dd46fd3
children 82d38421fdf3
line wrap: on
line diff
--- a/src/mainwindow.cpp	Tue Jul 19 17:45:10 2016 +0200
+++ b/src/mainwindow.cpp	Tue Jul 19 17:45:57 2016 +0200
@@ -52,6 +52,8 @@
     mInputRequester->setExistingOnly(true);
     inputLabel->setBuddy(mInputRequester);
 
+    setWindowTitle(QStringLiteral(PRETTY_NAME));
+
     inoutLay->addWidget(mInputRequester, 0, 1);
 
     auto outLabel = new QLabel(tr("Export Folder:"));
@@ -104,6 +106,7 @@
     connect(mTitleEdit, &QLineEdit::textChanged, this, &MainWindow::checkCompleted);
     connect(mInputRequester, &FileNameRequester::fileNameChanged, this, &MainWindow::checkCompleted);
     connect(mOutRequester, &FileNameRequester::fileNameChanged, this, &MainWindow::checkCompleted);
+    connect(btns, &QDialogButtonBox::rejected, this, &QMainWindow::close);
 }
 
 void MainWindow::showErrorMessage(const QString& errMsg) {
@@ -120,6 +123,8 @@
     if (mSettings.contains("geometry")) {
         restoreGeometry(mSettings.value("geometry").toByteArray());
         restoreState(mSettings.value("windowState").toByteArray());
+    } else {
+        resize(480, 360);
     }
 
     setInputFile(mSettings.value("lastInput",
@@ -135,6 +140,8 @@
 void MainWindow::setInputFile(const QString& file)
 {
     mInputRequester->setFileName(file);
+    QFileInfo fi(file);
+    mOutRequester->setFileName(fi.dir().path());
 }
 
 void MainWindow::setTitle(const QString& title) {
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)