From 480c05219b18e2ec900de09f012b0043c958f779 Mon Sep 17 00:00:00 2001 From: Mikhail Svechnikov <m.svechnikov@fz-juelich.de> Date: Tue, 3 Jan 2023 13:42:20 +0100 Subject: [PATCH] clang-format --- GUI/Model/Device/InstrumentModel.cpp | 4 ++-- GUI/Model/Device/InstrumentsEditController.h | 2 +- GUI/Model/FromCore/ItemizeSimulation.cpp | 2 +- GUI/Model/Project/ProjectDocument.cpp | 14 +++++++------- GUI/Model/Project/ProjectDocument.h | 4 ++-- GUI/View/Instrument/InstrumentsTreeModel.cpp | 2 +- GUI/View/Realspace/RealspaceBuilder.cpp | 2 +- GUI/View/Realspace/RealspaceBuilder.h | 2 +- .../SampleDesigner/LayerOrientedSampleEditor.cpp | 2 +- GUI/View/SampleDesigner/SampleEditorCommands.cpp | 2 +- GUI/View/SampleDesigner/SampleEditorController.cpp | 2 +- Tests/Unit/GUI/TestDetectorItems.cpp | 2 +- Tests/Unit/GUI/TestSessionModel.cpp | 2 +- 13 files changed, 21 insertions(+), 21 deletions(-) diff --git a/GUI/Model/Device/InstrumentModel.cpp b/GUI/Model/Device/InstrumentModel.cpp index 5cfb612670d..3c685dc7016 100644 --- a/GUI/Model/Device/InstrumentModel.cpp +++ b/GUI/Model/Device/InstrumentModel.cpp @@ -105,8 +105,8 @@ QString InstrumentModel::suggestInstrumentName(const QString& baseName) const return GUI::Util::String::suggestName(instrumentNames(), baseName); } -QVector<InstrumentItem*> InstrumentModel::instrumentItems( - const std::function<bool(const InstrumentItem*)>& accept) const +QVector<InstrumentItem*> +InstrumentModel::instrumentItems(const std::function<bool(const InstrumentItem*)>& accept) const { QVector<InstrumentItem*> result; for (auto* p : instrumentItems()) diff --git a/GUI/Model/Device/InstrumentsEditController.h b/GUI/Model/Device/InstrumentsEditController.h index ac107152cb6..0c2a79b6697 100644 --- a/GUI/Model/Device/InstrumentsEditController.h +++ b/GUI/Model/Device/InstrumentsEditController.h @@ -83,7 +83,7 @@ signals: private: InstrumentModel* m_instruments; //!< The edited/controlled instruments. This pointer is - //!< borrowed, not owned. + //!< borrowed, not owned. }; template <typename T> diff --git a/GUI/Model/FromCore/ItemizeSimulation.cpp b/GUI/Model/FromCore/ItemizeSimulation.cpp index ac6cde805fc..e796d45c540 100644 --- a/GUI/Model/FromCore/ItemizeSimulation.cpp +++ b/GUI/Model/FromCore/ItemizeSimulation.cpp @@ -32,8 +32,8 @@ #include "GUI/Model/Device/BackgroundItems.h" #include "GUI/Model/Device/BeamAngleItems.h" #include "GUI/Model/Device/BeamWavelengthItem.h" -#include "GUI/Model/Device/InstrumentModel.h" #include "GUI/Model/Device/InstrumentItems.h" +#include "GUI/Model/Device/InstrumentModel.h" #include "GUI/Model/Device/MaskItems.h" #include "GUI/Model/Device/RectangularDetectorItem.h" #include "GUI/Model/Device/ResolutionFunctionItems.h" diff --git a/GUI/Model/Project/ProjectDocument.cpp b/GUI/Model/Project/ProjectDocument.cpp index 7ef6f8e3efb..c0255537abd 100644 --- a/GUI/Model/Project/ProjectDocument.cpp +++ b/GUI/Model/Project/ProjectDocument.cpp @@ -55,7 +55,7 @@ ProjectDocument::ProjectDocument() , m_singleInstrumentMode(false) , m_singleSampleMode(false) , m_functionalities(All) - , m_instrumentEditController(&m_instruments) + , m_instrumentEditController(&m_instrumentModel) { connect(&m_instrumentEditController, &InstrumentsEditController::instrumentAddedOrRemoved, this, &ProjectDocument::onModelChanged, Qt::UniqueConnection); @@ -122,12 +122,12 @@ void ProjectDocument::setProjectFileName(const QString& projectFileName) InstrumentModel* ProjectDocument::collectedItems() const { - return const_cast<InstrumentModel*>(&m_instruments); + return const_cast<InstrumentModel*>(&m_instrumentModel); } SampleModel* ProjectDocument::sampleModel() { - return &m_sampleItems; + return &m_sampleModel; } RealModel* ProjectDocument::realModel() const @@ -319,12 +319,12 @@ void ProjectDocument::writeProject(QIODevice* device) // instruments w.writeStartElement(Tag::InstrumentModel); - m_instruments.writeTo(&w); + m_instrumentModel.writeTo(&w); w.writeEndElement(); // samples w.writeStartElement(Tag::SampleModel); - m_sampleItems.writeTo(&w); + m_sampleModel.writeTo(&w); w.writeEndElement(); // job model and real model @@ -372,12 +372,12 @@ ProjectDocument::ReadResult ProjectDocument::readProject(QIODevice* device, // instruments } else if (tag == Tag::InstrumentModel) { - m_instruments.readFrom(&r); + m_instrumentModel.readFrom(&r); XML::gotoEndElementOfTag(&r, tag); // samples } else if (tag == Tag::SampleModel) { - m_sampleItems.readFrom(&r); + m_sampleModel.readFrom(&r); XML::gotoEndElementOfTag(&r, tag); // job model and real model diff --git a/GUI/Model/Project/ProjectDocument.h b/GUI/Model/Project/ProjectDocument.h index 7112e700df0..40164179ff3 100644 --- a/GUI/Model/Project/ProjectDocument.h +++ b/GUI/Model/Project/ProjectDocument.h @@ -143,9 +143,9 @@ private: bool m_singleSampleMode; Functionalities m_functionalities; SimulationOptionsItem m_simulationOptionsItem; - SampleModel m_sampleItems; + SampleModel m_sampleModel; InstrumentsEditController m_instrumentEditController; - InstrumentModel m_instruments; + InstrumentModel m_instrumentModel; }; Q_DECLARE_OPERATORS_FOR_FLAGS(ProjectDocument::Functionalities) diff --git a/GUI/View/Instrument/InstrumentsTreeModel.cpp b/GUI/View/Instrument/InstrumentsTreeModel.cpp index 7d26f9f2e85..cffd3a2d8a0 100644 --- a/GUI/View/Instrument/InstrumentsTreeModel.cpp +++ b/GUI/View/Instrument/InstrumentsTreeModel.cpp @@ -14,8 +14,8 @@ #include "GUI/View/Instrument/InstrumentsTreeModel.h" #include "GUI/Application/ApplicationSettings.h" -#include "GUI/Model/Device/InstrumentModel.h" #include "GUI/Model/Device/InstrumentItems.h" +#include "GUI/Model/Device/InstrumentModel.h" #include <QApplication> #include <QtCore> #include <QtGui> diff --git a/GUI/View/Realspace/RealspaceBuilder.cpp b/GUI/View/Realspace/RealspaceBuilder.cpp index 718e19517ea..e625db47750 100644 --- a/GUI/View/Realspace/RealspaceBuilder.cpp +++ b/GUI/View/Realspace/RealspaceBuilder.cpp @@ -129,7 +129,7 @@ void RealspaceBuilder::populate(Model* model, Item3D* item, } void RealspaceBuilder::populateSample(Model* model, const SampleItem& mlayerItem, - const SceneGeometry& sceneGeometry, const F3&) const + const SceneGeometry& sceneGeometry, const F3&) const { double total_height(0.0); int index(0); diff --git a/GUI/View/Realspace/RealspaceBuilder.h b/GUI/View/Realspace/RealspaceBuilder.h index 16dc85a4a4b..820ee389c26 100644 --- a/GUI/View/Realspace/RealspaceBuilder.h +++ b/GUI/View/Realspace/RealspaceBuilder.h @@ -46,7 +46,7 @@ private: const Img3D::F3& origin = {}) const; void populateSample(Img3D::Model* model, const SampleItem& mlayerItem, - const SceneGeometry& sceneGeometry, const Img3D::F3& origin = {}) const; + const SceneGeometry& sceneGeometry, const Img3D::F3& origin = {}) const; void populateLayer(Img3D::Model* model, const LayerItem& layerItem, const SceneGeometry& sceneGeometry, const Img3D::F3& origin = {}, diff --git a/GUI/View/SampleDesigner/LayerOrientedSampleEditor.cpp b/GUI/View/SampleDesigner/LayerOrientedSampleEditor.cpp index dde4fa9b428..1db7546513c 100644 --- a/GUI/View/SampleDesigner/LayerOrientedSampleEditor.cpp +++ b/GUI/View/SampleDesigner/LayerOrientedSampleEditor.cpp @@ -19,8 +19,8 @@ #include "GUI/Model/Sample/SampleItem.h" #include "GUI/View/Common/StyledToolbar.h" #include "GUI/View/SampleDesigner/LayerEditorUtils.h" -#include "GUI/View/SampleDesigner/SampleForm.h" #include "GUI/View/SampleDesigner/SampleEditorController.h" +#include "GUI/View/SampleDesigner/SampleForm.h" #include <QActionGroup> #include <QBoxLayout> #include <QPushButton> diff --git a/GUI/View/SampleDesigner/SampleEditorCommands.cpp b/GUI/View/SampleDesigner/SampleEditorCommands.cpp index b74a1c626f4..f152d2a6ded 100644 --- a/GUI/View/SampleDesigner/SampleEditorCommands.cpp +++ b/GUI/View/SampleDesigner/SampleEditorCommands.cpp @@ -16,8 +16,8 @@ #include "GUI/Model/Sample/LayerItem.h" #include "GUI/Model/Sample/SampleItem.h" #include "GUI/Support/XML/Backup.h" -#include "GUI/View/SampleDesigner/SampleForm.h" #include "GUI/View/SampleDesigner/SampleEditorController.h" +#include "GUI/View/SampleDesigner/SampleForm.h" #include <utility> namespace { diff --git a/GUI/View/SampleDesigner/SampleEditorController.cpp b/GUI/View/SampleDesigner/SampleEditorController.cpp index 7f502c38cd4..39dd711fb37 100644 --- a/GUI/View/SampleDesigner/SampleEditorController.cpp +++ b/GUI/View/SampleDesigner/SampleEditorController.cpp @@ -32,9 +32,9 @@ #include "GUI/View/SampleDesigner/LayerForm.h" #include "GUI/View/SampleDesigner/MaterialInplaceForm.h" #include "GUI/View/SampleDesigner/MesocrystalForm.h" -#include "GUI/View/SampleDesigner/SampleForm.h" #include "GUI/View/SampleDesigner/ParticleLayoutForm.h" #include "GUI/View/SampleDesigner/SampleEditorCommands.h" +#include "GUI/View/SampleDesigner/SampleForm.h" #include "Sample/HardParticle/Cylinder.h" SampleEditorController::SampleEditorController(ProjectDocument* document, SampleItem* multi) diff --git a/Tests/Unit/GUI/TestDetectorItems.cpp b/Tests/Unit/GUI/TestDetectorItems.cpp index 3e3b2e6c454..658da68fb08 100644 --- a/Tests/Unit/GUI/TestDetectorItems.cpp +++ b/Tests/Unit/GUI/TestDetectorItems.cpp @@ -2,8 +2,8 @@ #include "Device/Detector/IDetector.h" #include "Device/Resolution/ConvolutionDetectorResolution.h" #include "Device/Resolution/ResolutionFunction2DGaussian.h" -#include "GUI/Model/Device/InstrumentModel.h" #include "GUI/Model/Device/InstrumentItems.h" +#include "GUI/Model/Device/InstrumentModel.h" #include "GUI/Model/Device/RectangularDetectorItem.h" #include "GUI/Model/Device/ResolutionFunctionItems.h" #include "GUI/Model/Device/SphericalDetectorItem.h" diff --git a/Tests/Unit/GUI/TestSessionModel.cpp b/Tests/Unit/GUI/TestSessionModel.cpp index b7450f66c3c..9c102580c19 100644 --- a/Tests/Unit/GUI/TestSessionModel.cpp +++ b/Tests/Unit/GUI/TestSessionModel.cpp @@ -1,8 +1,8 @@ #include "GUI/Model/BaseItem/PropertyItem.h" #include "GUI/Model/Data/DataItem.h" #include "GUI/Model/Data/RealItem.h" -#include "GUI/Model/Device/InstrumentModel.h" #include "GUI/Model/Device/InstrumentItems.h" +#include "GUI/Model/Device/InstrumentModel.h" #include "GUI/Model/Device/MaskItems.h" #include "GUI/Model/Job/JobItem.h" #include "GUI/Model/Model/JobModel.h" -- GitLab