| 659 | } |
| 660 | |
| 661 | void MainWindow::readSettings() { |
| 662 | QString sPath = QCoreApplication::applicationDirPath() + "/" + IniFileName; |
| 663 | //settings.setPath(QSettings::IniFormat, QSettings::SystemScope, sPath); |
| 664 | QSettings settings(sPath, QSettings::IniFormat); |
| 665 | settings.setIniCodec("UTF-8"); |
| 666 | const QByteArray geometry = settings.value("geometry", QByteArray()).toByteArray(); |
| 667 | if(geometry.isEmpty()) { |
| 668 | this->showMaximized(); |
| 669 | settings.setValue("geometry", saveGeometry()); |
| 670 | } else { |
| 671 | restoreGeometry(geometry); |
| 672 | } |
| 673 | } |
| 674 | |
| 675 | void MainWindow::writeSettings() { |
| 676 | QString sPath = QCoreApplication::applicationDirPath() + "/" + IniFileName; |