From 23f83cde8ad891458388271a758a6cfee29e0d15 Mon Sep 17 00:00:00 2001
From: Mikhail Svechnikov <m.svechnikov@fz-juelich.de>
Date: Tue, 14 Feb 2023 11:16:53 +0100
Subject: [PATCH] ID: change case

---
 GUI/Model/Project/ProjectDocument.cpp |  2 +-
 GUI/Support/Data/ID.h                 |  2 +-
 GUI/View/Job/JobView.cpp              |  2 +-
 GUI/View/Main/MainWindow.cpp          | 38 +++++++++++++--------------
 4 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/GUI/Model/Project/ProjectDocument.cpp b/GUI/Model/Project/ProjectDocument.cpp
index 0bc4c59b94b..577d97125a0 100644
--- a/GUI/Model/Project/ProjectDocument.cpp
+++ b/GUI/Model/Project/ProjectDocument.cpp
@@ -56,7 +56,7 @@ ProjectDocument::ProjectDocument()
     , m_singleSampleMode(false)
     , m_functionalities(All)
     , m_instrumentEditController(&m_instrumentModel)
-    , m_lastViewActive(GUI::ID::ViewId::INSTRUMENT)
+    , m_lastViewActive(GUI::ID::ViewId::Instrument)
 {
     connect(&m_instrumentEditController, &InstrumentsEditController::instrumentAddedOrRemoved, this,
             &ProjectDocument::onModelChanged, Qt::UniqueConnection);
diff --git a/GUI/Support/Data/ID.h b/GUI/Support/Data/ID.h
index dc5f0cc7490..b8670af502d 100644
--- a/GUI/Support/Data/ID.h
+++ b/GUI/Support/Data/ID.h
@@ -24,7 +24,7 @@ enum ProjectionType { Horizontal, Vertical, Invalid };
 enum class Distributions { All, Symmetric };
 
 //! Enumerates views of the main window
-enum ViewId { PROJECTS, INSTRUMENT, SAMPLE, IMPORT, SIMULATION, JOB };
+enum ViewId { Projects, Instrument, Sample, Import, Simulation, Job };
 
 } // namespace GUI::ID
 
diff --git a/GUI/View/Job/JobView.cpp b/GUI/View/Job/JobView.cpp
index 3205fa8d4ff..cd5844c53be 100644
--- a/GUI/View/Job/JobView.cpp
+++ b/GUI/View/Job/JobView.cpp
@@ -65,7 +65,7 @@ void JobView::onFocusRequest(JobItem* jobItem)
         setActivityAndPresentationForNewJob(jobItem);
     }
 
-    emit focusRequest(GUI::ID::JOB);
+    emit focusRequest(GUI::ID::Job);
 }
 
 //! Sets docks visibility in accordance with required activity.
diff --git a/GUI/View/Main/MainWindow.cpp b/GUI/View/Main/MainWindow.cpp
index 3110460cb52..4d3964e1415 100644
--- a/GUI/View/Main/MainWindow.cpp
+++ b/GUI/View/Main/MainWindow.cpp
@@ -94,8 +94,8 @@ MainWindow::MainWindow()
     connect(m_projectManager, &ProjectManager::aboutToCloseDocument, this,
             &MainWindow::onAboutToCloseDocument);
 
-    ASSERT(m_viewSelectionButtons->button(GUI::ID::ViewId::PROJECTS) != nullptr);
-    m_viewSelectionButtons->button(GUI::ID::ViewId::PROJECTS)->setChecked(true);
+    ASSERT(m_viewSelectionButtons->button(GUI::ID::ViewId::Projects) != nullptr);
+    m_viewSelectionButtons->button(GUI::ID::ViewId::Projects)->setChecked(true);
 
     updateTitle();
     if (appSettings)
@@ -128,7 +128,7 @@ void MainWindow::setCurrentView(int viewId)
 
 void MainWindow::raiseView(int viewId)
 {
-    if (gProjectDocument.has_value() && viewId != GUI::ID::ViewId::PROJECTS)
+    if (gProjectDocument.has_value() && viewId != GUI::ID::ViewId::Projects)
         gProjectDocument.value()->setViewId(viewId);
     if (m_viewsStack->currentIndex() != viewId) {
         m_viewsStack->setCurrentIndex(viewId);
@@ -210,25 +210,25 @@ void MainWindow::initProgressBar()
 
 void MainWindow::initButtons()
 {
-    addButton(GUI::ID::ViewId::PROJECTS, QIcon(":/images/main_welcomeview.svg"), "Projects",
+    addButton(GUI::ID::ViewId::Projects, QIcon(":/images/main_welcomeview.svg"), "Projects",
               "Switch to Projects View");
-    addButton(GUI::ID::ViewId::INSTRUMENT, QIcon(":/images/main_instrumentview.svg"), "Instrument",
+    addButton(GUI::ID::ViewId::Instrument, QIcon(":/images/main_instrumentview.svg"), "Instrument",
               "Define the beam and the  detector");
 
-    addButton(GUI::ID::ViewId::SAMPLE, QIcon(":/images/main_sampleview.svg"), "Sample",
+    addButton(GUI::ID::ViewId::Sample, QIcon(":/images/main_sampleview.svg"), "Sample",
               "Build the sample");
 
-    addButton(GUI::ID::ViewId::IMPORT, QIcon(":/images/main_importview.svg"), "Data",
+    addButton(GUI::ID::ViewId::Import, QIcon(":/images/main_importview.svg"), "Data",
               "Import intensity data to fit");
 
-    addButton(GUI::ID::ViewId::SIMULATION, QIcon(":/images/main_simulationview.svg"), "Simulation",
+    addButton(GUI::ID::ViewId::Simulation, QIcon(":/images/main_simulationview.svg"), "Simulation",
               "Run simulation");
 
-    addButton(GUI::ID::ViewId::JOB, QIcon(":/images/main_jobview.svg"), "Jobs",
+    addButton(GUI::ID::ViewId::Job, QIcon(":/images/main_jobview.svg"), "Jobs",
               "Switch to see job results, tune parameters real time,\nfit the data");
 
     for (auto* button : m_viewSelectionButtons->buttons()) {
-        if (button == m_viewSelectionButtons->button(GUI::ID::ViewId::PROJECTS))
+        if (button == m_viewSelectionButtons->button(GUI::ID::ViewId::Projects))
             continue;
         button->setEnabled(false);
     }
@@ -237,7 +237,7 @@ void MainWindow::initButtons()
 void MainWindow::initViews()
 {
     m_projectsView = new ProjectsView(this);
-    resetView(GUI::ID::ViewId::PROJECTS, m_projectsView);
+    resetView(GUI::ID::ViewId::Projects, m_projectsView);
 
     if (gProjectDocument.has_value()) {
         auto* doc = gProjectDocument.value();
@@ -247,15 +247,15 @@ void MainWindow::initViews()
         m_simulationView = new SimulationView(this, doc);
         m_jobView = new JobView(this, doc);
 
-        resetView(GUI::ID::ViewId::INSTRUMENT, m_instrumentView);
+        resetView(GUI::ID::ViewId::Instrument, m_instrumentView);
 
-        resetView(GUI::ID::ViewId::SAMPLE, m_sampleView);
+        resetView(GUI::ID::ViewId::Sample, m_sampleView);
 
-        resetView(GUI::ID::ViewId::IMPORT, m_importDataView);
+        resetView(GUI::ID::ViewId::Import, m_importDataView);
 
-        resetView(GUI::ID::ViewId::SIMULATION, m_simulationView);
+        resetView(GUI::ID::ViewId::Simulation, m_simulationView);
 
-        resetView(GUI::ID::ViewId::JOB, m_jobView);
+        resetView(GUI::ID::ViewId::Job, m_jobView);
 
         connect(m_jobView, &JobView::focusRequest, this, &MainWindow::onFocusRequest);
 
@@ -264,7 +264,7 @@ void MainWindow::initViews()
         if (gProjectDocument.has_value())
             setCurrentView(gProjectDocument.value()->viewId());
         else
-            raiseView(GUI::ID::ViewId::PROJECTS);
+            raiseView(GUI::ID::ViewId::Projects);
     }
 }
 
@@ -363,7 +363,7 @@ void MainWindow::onDocumentOpenedOrClosed(bool open)
                     fillerBtn->setEnabled(true);
             setCurrentView(gProjectDocument.value()->viewId());
         } else
-            setCurrentView(GUI::ID::ViewId::INSTRUMENT);
+            setCurrentView(GUI::ID::ViewId::Instrument);
     }
 }
 
@@ -374,7 +374,7 @@ void MainWindow::onDocumentModified()
 
 void MainWindow::onAboutToCloseDocument()
 {
-    setCurrentView(GUI::ID::ViewId::PROJECTS);
+    setCurrentView(GUI::ID::ViewId::Projects);
 
     updateViewSelectionButtonsGeometry();
 
-- 
GitLab