#include <Common/iLogger>
#include <Common/iRegistry>
+#include <Common/iApp>
#include <QtGui>
bool MainWindow::init()
{
+ setWindowTitle(Common::iApp::instance()->name());
+
show();
EVAF_INFO("%s initialized", qPrintable(objectName()));
void MainWindow::saveSettings()
{
static int ver[4] = {VER_FILE_VERSION};
- QSettings settings(VER_COMPANY_NAME_STR, VER_PRODUCT_NAME_STR);
+ QSettings settings(VER_COMPANY_NAME_STR, Common::iApp::instance()->name());
settings.setValue(QString("%1/version/major").arg(objectName()), ver[0]);
settings.setValue(QString("%1/version/minor").arg(objectName()), ver[1]);
settings.setValue(QString("%1/geometry").arg(objectName()), saveGeometry());
void MainWindow::restoreSettings()
{
static int ver[4] = {VER_FILE_VERSION};
- QSettings settings(VER_COMPANY_NAME_STR, VER_PRODUCT_NAME_STR);
+ QSettings settings(VER_COMPANY_NAME_STR, Common::iApp::instance()->name());
// Ignore saved settings if the version number is not the same
// More intelligent checks can be implemented to allow upgrading from previous versions