diff --git a/GUI/View/Fit/JobMessagePanel.cpp b/GUI/View/Fit/JobMessagePanel.cpp index e03ba91538fef6ee1650d644d2f557a4b367635b..b30544512384b890595af1740475c57d00bcf1cf 100644 --- a/GUI/View/Fit/JobMessagePanel.cpp +++ b/GUI/View/Fit/JobMessagePanel.cpp @@ -63,9 +63,9 @@ JobMessagePanel::~JobMessagePanel() void JobMessagePanel::readSettings() { QSettings settings; - if (settings.childGroups().contains(GUI::Constants::S_JOBMESSAGEPANEL)) { - settings.beginGroup(GUI::Constants::S_JOBMESSAGEPANEL); - m_panelSize = settings.value(GUI::Constants::S_JOBMESSAGEPANEL_SIZE).toSize(); + if (settings.childGroups().contains(GUI::Constants::S_JOB_MESSAGE_PANEL)) { + settings.beginGroup(GUI::Constants::S_JOB_MESSAGE_PANEL); + m_panelSize = settings.value(GUI::Constants::S_JOB_MESSAGE_PANEL_SIZE).toSize(); settings.endGroup(); } } @@ -73,8 +73,8 @@ void JobMessagePanel::readSettings() void JobMessagePanel::writeSettings() { QSettings settings; - settings.beginGroup(GUI::Constants::S_JOBMESSAGEPANEL); - settings.setValue(GUI::Constants::S_JOBMESSAGEPANEL_SIZE, size()); + settings.beginGroup(GUI::Constants::S_JOB_MESSAGE_PANEL); + settings.setValue(GUI::Constants::S_JOB_MESSAGE_PANEL_SIZE, size()); settings.endGroup(); settings.sync(); } diff --git a/GUI/View/Main/ActionManager.cpp b/GUI/View/Main/ActionManager.cpp index c518d204eb878af5b5182d86715e0d59851b86d6..bc5dd32e4f4e6218eff31c01df78526a11b8078d 100644 --- a/GUI/View/Main/ActionManager.cpp +++ b/GUI/View/Main/ActionManager.cpp @@ -212,11 +212,11 @@ void ActionManager::onAboutToShowSettingsMenu() QSettings settings; - settings.beginGroup(GUI::Constants::S_SESSIONMODELVIEW); + settings.beginGroup(GUI::Constants::S_SESSION_MODEL_VIEW); QAction* action = m_settingsMenu->addAction("&Model tech view"); action->setToolTip("Additional developer's view will appear in left control tab bar"); action->setCheckable(true); - action->setChecked(settings.value(GUI::Constants::S_VIEWISACTIVE, false).toBool()); + action->setChecked(settings.value(GUI::Constants::S_VIEW_IS_ACTIVE, false).toBool()); connect(action, &QAction::toggled, this, &ActionManager::setSessionModelViewActive); settings.endGroup(); @@ -284,8 +284,8 @@ void ActionManager::onAboutToShowViewMenu() void ActionManager::setSessionModelViewActive(bool status) { QSettings settings; - settings.beginGroup(GUI::Constants::S_SESSIONMODELVIEW); - settings.setValue(GUI::Constants::S_VIEWISACTIVE, status); + settings.beginGroup(GUI::Constants::S_SESSION_MODEL_VIEW); + settings.setValue(GUI::Constants::S_VIEW_IS_ACTIVE, status); settings.endGroup(); m_mainWindow->onSessionModelViewActive(status); } diff --git a/GUI/View/Main/MainWindow.cpp b/GUI/View/Main/MainWindow.cpp index 99dd52cbf31c2be2195979cc3c9cf42adf6aa916..ccdfc30672c04023d6aea8dc1bae1ec31f10f2c1 100644 --- a/GUI/View/Main/MainWindow.cpp +++ b/GUI/View/Main/MainWindow.cpp @@ -263,8 +263,8 @@ void MainWindow::initViews() // enabling technical view QSettings settings; - settings.beginGroup(GUI::Constants::S_SESSIONMODELVIEW); - onSessionModelViewActive(settings.value(GUI::Constants::S_VIEWISACTIVE, false).toBool()); + settings.beginGroup(GUI::Constants::S_SESSION_MODEL_VIEW); + onSessionModelViewActive(settings.value(GUI::Constants::S_VIEW_IS_ACTIVE, false).toBool()); settings.endGroup(); connect(m_jobView, &JobView::focusRequest, this, &MainWindow::onFocusRequest); @@ -279,10 +279,10 @@ void MainWindow::initViews() void MainWindow::readSettings() { QSettings settings; - if (settings.childGroups().contains(GUI::Constants::S_MAINWINDOW)) { - settings.beginGroup(GUI::Constants::S_MAINWINDOW); - resize(settings.value(GUI::Constants::S_WINDOWSIZE, QSize(400, 400)).toSize()); - move(settings.value(GUI::Constants::S_WINDOWPOSITION, QPoint(200, 200)).toPoint()); + if (settings.childGroups().contains(GUI::Constants::S_MAIN_WINDOW)) { + settings.beginGroup(GUI::Constants::S_MAIN_WINDOW); + resize(settings.value(GUI::Constants::S_WINDOW_SIZE, QSize(400, 400)).toSize()); + move(settings.value(GUI::Constants::S_WINDOW_POSITION, QPoint(200, 200)).toPoint()); settings.endGroup(); } m_projectManager->readSettings(); @@ -291,9 +291,9 @@ void MainWindow::readSettings() void MainWindow::writeSettings() { QSettings settings; - settings.beginGroup(GUI::Constants::S_MAINWINDOW); - settings.setValue(GUI::Constants::S_WINDOWSIZE, size()); - settings.setValue(GUI::Constants::S_WINDOWPOSITION, pos()); + settings.beginGroup(GUI::Constants::S_MAIN_WINDOW); + settings.setValue(GUI::Constants::S_WINDOW_SIZE, size()); + settings.setValue(GUI::Constants::S_WINDOW_POSITION, pos()); settings.endGroup(); m_projectManager->writeSettings(); settings.sync(); diff --git a/GUI/View/Tool/mainwindow_constants.h b/GUI/View/Tool/mainwindow_constants.h index 292692620a48fbdd456bab7abefd0838c8adda1c..66bbc91d5d8f4cb62bf40c311f3dbcfbcdf16ab4 100644 --- a/GUI/View/Tool/mainwindow_constants.h +++ b/GUI/View/Tool/mainwindow_constants.h @@ -20,16 +20,16 @@ namespace GUI::Constants { // Settings groups -const char S_MAINWINDOW[] = "MainWindow"; -const char S_JOBMESSAGEPANEL[] = "JobMessagePanel"; -const char S_SESSIONMODELVIEW[] = "SessionModelView"; +const char S_MAIN_WINDOW[] = "MainWindow"; +const char S_JOB_MESSAGE_PANEL[] = "JobMessagePanel"; +const char S_SESSION_MODEL_VIEW[] = "SessionModelView"; // Settings keys -const char S_WINDOWSIZE[] = "size"; -const char S_WINDOWPOSITION[] = "pos"; -const char S_VIEWISACTIVE[] = "ViewIsActive"; +const char S_WINDOW_SIZE[] = "size"; +const char S_WINDOW_POSITION[] = "pos"; +const char S_VIEW_IS_ACTIVE[] = "ViewIsActive"; -const char S_JOBMESSAGEPANEL_SIZE[] = "size"; +const char S_JOB_MESSAGE_PANEL_SIZE[] = "size"; const int MAX_RECENT_PROJECTS = 10;