From 04a81874ff50b7cb146a2d87e26473b404256ae5 Mon Sep 17 00:00:00 2001 From: Matthias Puchner <github@mpuchner.de> Date: Mon, 29 Nov 2021 12:48:04 +0100 Subject: [PATCH] rm obsolete MaterialItemUtils --- GUI/Model/From/GUIDomainSampleVisitor.cpp | 1 - GUI/Model/Job/JobModelFunctions.cpp | 1 - GUI/Model/Material/MaterialItemUtils.cpp | 18 -------------- GUI/Model/Material/MaterialItemUtils.h | 24 ------------------- GUI/Model/Material/MaterialModel.cpp | 2 +- GUI/Model/Sample/ItemWithMaterial.cpp | 2 +- GUI/Model/Sample/LayerItem.cpp | 4 ++-- GUI/Model/Sample/ParticleItem.cpp | 1 - GUI/Model/Sample/SampleModel.cpp | 1 - .../MaterialEditor/MaterialEditorDialog.cpp | 1 - GUI/View/Tool/DesignerHelper.cpp | 1 - Tests/Unit/GUI/TestMaterialModel.cpp | 1 - 12 files changed, 4 insertions(+), 53 deletions(-) delete mode 100644 GUI/Model/Material/MaterialItemUtils.cpp delete mode 100644 GUI/Model/Material/MaterialItemUtils.h diff --git a/GUI/Model/From/GUIDomainSampleVisitor.cpp b/GUI/Model/From/GUIDomainSampleVisitor.cpp index f79484de254..848e6f156a4 100644 --- a/GUI/Model/From/GUIDomainSampleVisitor.cpp +++ b/GUI/Model/From/GUIDomainSampleVisitor.cpp @@ -16,7 +16,6 @@ #include "Base/Const/Units.h" #include "GUI/Model/From/FromDomain.h" #include "GUI/Model/Material/MaterialItem.h" -#include "GUI/Model/Material/MaterialItemUtils.h" #include "GUI/Model/Material/MaterialModel.h" #include "GUI/Model/Sample/FormFactorItems.h" #include "GUI/Model/Sample/InterferenceItems.h" diff --git a/GUI/Model/Job/JobModelFunctions.cpp b/GUI/Model/Job/JobModelFunctions.cpp index 728affd0dd1..e7f99ef7ed3 100644 --- a/GUI/Model/Job/JobModelFunctions.cpp +++ b/GUI/Model/Job/JobModelFunctions.cpp @@ -30,7 +30,6 @@ #include "GUI/Model/Job/JobItemUtils.h" #include "GUI/Model/Material/MaterialItem.h" #include "GUI/Model/Material/MaterialItemContainer.h" -#include "GUI/Model/Material/MaterialItemUtils.h" #include "GUI/Model/Sample/ItemWithMaterial.h" #include "GUI/Model/Sample/MultiLayerItem.h" #include "GUI/Util/Error.h" diff --git a/GUI/Model/Material/MaterialItemUtils.cpp b/GUI/Model/Material/MaterialItemUtils.cpp deleted file mode 100644 index fb42c1f1a77..00000000000 --- a/GUI/Model/Material/MaterialItemUtils.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// ************************************************************************************************ -// -// BornAgain: simulate and fit reflection and scattering -// -//! @file GUI/Model/Material/MaterialItemUtils.cpp -//! @brief Implements class MaterialItemUtils -//! -//! @homepage http://www.bornagainproject.org -//! @license GNU General Public License v3 or higher (see COPYING) -//! @copyright Forschungszentrum Jülich GmbH 2018 -//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) -// -// ************************************************************************************************ - -#include "GUI/Model/Material/MaterialItemUtils.h" - -#include <deque> -#include <random> diff --git a/GUI/Model/Material/MaterialItemUtils.h b/GUI/Model/Material/MaterialItemUtils.h deleted file mode 100644 index d3c419f37b0..00000000000 --- a/GUI/Model/Material/MaterialItemUtils.h +++ /dev/null @@ -1,24 +0,0 @@ -// ************************************************************************************************ -// -// BornAgain: simulate and fit reflection and scattering -// -//! @file GUI/Model/Material/MaterialItemUtils.h -//! @brief Defines namespace GUI::MaterialUtil -//! -//! @homepage http://www.bornagainproject.org -//! @license GNU General Public License v3 or higher (see COPYING) -//! @copyright Forschungszentrum Jülich GmbH 2018 -//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) -// -// ************************************************************************************************ - -#ifndef BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALITEMUTILS_H -#define BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALITEMUTILS_H - -#include <QColor> - -namespace GUI::MaterialUtil { - -} // namespace GUI::MaterialUtil - -#endif // BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALITEMUTILS_H diff --git a/GUI/Model/Material/MaterialModel.cpp b/GUI/Model/Material/MaterialModel.cpp index 6d502353f1a..80ade671442 100644 --- a/GUI/Model/Material/MaterialModel.cpp +++ b/GUI/Model/Material/MaterialModel.cpp @@ -14,8 +14,8 @@ #include "GUI/Model/Material/MaterialModel.h" #include "GUI/Model/Material/MaterialItem.h" -#include "GUI/Model/Material/MaterialItemUtils.h" #include "GUI/Model/Material/MaterialModelStore.h" +#include <QColor> #include <QUuid> #include <random> diff --git a/GUI/Model/Sample/ItemWithMaterial.cpp b/GUI/Model/Sample/ItemWithMaterial.cpp index aa3c5848363..e77158c42ee 100644 --- a/GUI/Model/Sample/ItemWithMaterial.cpp +++ b/GUI/Model/Sample/ItemWithMaterial.cpp @@ -17,9 +17,9 @@ #include "GUI/Model/Job/JobModelFunctions.h" #include "GUI/Model/Material/MaterialItem.h" #include "GUI/Model/Material/MaterialItemContainer.h" -#include "GUI/Model/Material/MaterialItemUtils.h" #include "GUI/Model/Material/MaterialModel.h" #include "GUI/Model/Material/MaterialModelStore.h" +#include <QColor> void ItemWithMaterial::setMaterial(const MaterialItem* materialItem) { diff --git a/GUI/Model/Sample/LayerItem.cpp b/GUI/Model/Sample/LayerItem.cpp index c3574dcb0db..f34e9f1c442 100644 --- a/GUI/Model/Sample/LayerItem.cpp +++ b/GUI/Model/Sample/LayerItem.cpp @@ -14,7 +14,6 @@ #include "GUI/Model/Sample/LayerItem.h" #include "GUI/Model/Group/GroupInfo.h" -#include "GUI/Model/Material/MaterialItemUtils.h" #include "GUI/Model/Sample/LayerRoughnessItems.h" #include "GUI/Model/Sample/MesoCrystalItem.h" #include "GUI/Model/Sample/MultiLayerItem.h" @@ -25,8 +24,9 @@ #include "GUI/Model/Types/DoubleDescriptor.h" #include "GUI/Model/Types/UIntDescriptor.h" #include "GUI/Util/Error.h" - +#include <QColor> #include <boost/polymorphic_cast.hpp> + using boost::polymorphic_cast; namespace { diff --git a/GUI/Model/Sample/ParticleItem.cpp b/GUI/Model/Sample/ParticleItem.cpp index 4c138bbb2e4..cd88e0018e7 100644 --- a/GUI/Model/Sample/ParticleItem.cpp +++ b/GUI/Model/Sample/ParticleItem.cpp @@ -17,7 +17,6 @@ #include "GUI/Model/Job/JobItem.h" #include "GUI/Model/Job/JobModelFunctions.h" #include "GUI/Model/Material/MaterialItem.h" -#include "GUI/Model/Material/MaterialItemUtils.h" #include "GUI/Model/Sample/FormFactorItems.h" #include "GUI/Model/Sample/ParticleCoreShellItem.h" #include "GUI/Model/Sample/ParticleLayoutItem.h" diff --git a/GUI/Model/Sample/SampleModel.cpp b/GUI/Model/Sample/SampleModel.cpp index 4f89486f06d..b2071b98ee5 100644 --- a/GUI/Model/Sample/SampleModel.cpp +++ b/GUI/Model/Sample/SampleModel.cpp @@ -14,7 +14,6 @@ #include "GUI/Model/Sample/SampleModel.h" #include "GUI/Model/Group/PropertyItem.h" -#include "GUI/Model/Material/MaterialItemUtils.h" #include "GUI/Model/Sample/ItemWithMaterial.h" #include "GUI/Model/Sample/MultiLayerItem.h" #include "GUI/Model/Session/ModelUtils.h" diff --git a/GUI/View/MaterialEditor/MaterialEditorDialog.cpp b/GUI/View/MaterialEditor/MaterialEditorDialog.cpp index 66fb2465cfb..6bef3d85162 100644 --- a/GUI/View/MaterialEditor/MaterialEditorDialog.cpp +++ b/GUI/View/MaterialEditor/MaterialEditorDialog.cpp @@ -15,7 +15,6 @@ #include "GUI/View/MaterialEditor/MaterialEditorDialog.h" #include "GUI/Application/ApplicationSettings.h" #include "GUI/Model/Material/MaterialItem.h" -#include "GUI/Model/Material/MaterialItemUtils.h" #include "GUI/Model/Material/MaterialModel.h" #include "GUI/Model/Material/MaterialModelStore.h" #include "GUI/Model/Project/ProjectDocument.h" diff --git a/GUI/View/Tool/DesignerHelper.cpp b/GUI/View/Tool/DesignerHelper.cpp index 747f84d71f2..f43170d3336 100644 --- a/GUI/View/Tool/DesignerHelper.cpp +++ b/GUI/View/Tool/DesignerHelper.cpp @@ -13,7 +13,6 @@ // ************************************************************************************************ #include "GUI/View/Tool/DesignerHelper.h" -#include "GUI/Model/Material/MaterialItemUtils.h" #include "GUI/View/Tool/StyleUtils.h" #include <QPainter> #include <cmath> diff --git a/Tests/Unit/GUI/TestMaterialModel.cpp b/Tests/Unit/GUI/TestMaterialModel.cpp index a3a780cbf35..c71d7bff5d3 100644 --- a/Tests/Unit/GUI/TestMaterialModel.cpp +++ b/Tests/Unit/GUI/TestMaterialModel.cpp @@ -1,6 +1,5 @@ #include "GUI/Model/Material/MaterialDataItems.h" #include "GUI/Model/Material/MaterialItem.h" -#include "GUI/Model/Material/MaterialItemUtils.h" #include "GUI/Model/Material/MaterialModel.h" #include "Tests/GTestWrapper/google_test.h" #include <memory> -- GitLab