Skip to content
Snippets Groups Projects
Commit 88f5dd78 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

four items inherit from Item3D

parent 2b96b4f2
No related branches found
No related tags found
1 merge request!1080replace variant of pointers by polymorphism (#351)
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file GUI/Model/Sample/Item3D.h
//! @brief Defines class Item3D
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2021
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_ITEM3D_H
#define BORNAGAIN_GUI_MODEL_SAMPLE_ITEM3D_H
//! Base class of items that can be at the root of a realspace 3D representation
class Item3D {
};
#endif // BORNAGAIN_GUI_MODEL_SAMPLE_ITEM3D_H
......@@ -19,12 +19,13 @@
#include "GUI/Model/Descriptor/SelectionProperty.h"
#include "GUI/Model/Descriptor/VectorProperty.h"
#include "GUI/Model/Sample/RotationItems.h"
#include "GUI/Model/Sample/Item3D.h"
#include <memory>
class IRotation;
class Streamer;
class ItemWithParticles {
class ItemWithParticles : public Item3D {
public:
virtual ~ItemWithParticles() = default;
DoubleDescriptor abundance() const;
......
......@@ -20,6 +20,7 @@
#include "GUI/Model/Descriptor/UIntProperty.h"
#include "GUI/Model/Sample/ItemWithMaterial.h"
#include "GUI/Model/Sample/LayerRoughnessItems.h"
#include "GUI/Model/Sample/Item3D.h"
#include <QColor>
#include <QUuid>
#include <QVector>
......@@ -33,7 +34,7 @@ class QXmlStreamReader;
class QXmlStreamWriter;
class Streamer;
class LayerItem : public ItemWithMaterial {
class LayerItem : public ItemWithMaterial, Item3D {
public:
explicit LayerItem(const MaterialItems* materials);
......
......@@ -18,6 +18,7 @@
#include "GUI/Model/Descriptor/DoubleProperty.h"
#include "GUI/Model/Descriptor/VectorProperty.h"
#include "GUI/Model/Sample/MaterialItems.h"
#include "GUI/Model/Sample/Item3D.h"
#include <QString>
#include <QUuid>
#include <QVector>
......@@ -28,7 +29,7 @@ class QXmlStreamReader;
class QXmlStreamWriter;
class Streamer;
class MultiLayerItem {
class MultiLayerItem : public Item3D {
public:
MultiLayerItem();
......
......@@ -18,6 +18,7 @@
#include "GUI/Model/Descriptor/DoubleProperty.h"
#include "GUI/Model/Descriptor/SelectionProperty.h"
#include "GUI/Model/Sample/InterferenceItems.h"
#include "GUI/Model/Sample/Item3D.h"
#include <QUuid>
#include <memory>
......@@ -25,7 +26,7 @@ class ItemWithParticles;
class Streamer;
class MaterialItems;
class ParticleLayoutItem {
class ParticleLayoutItem : public Item3D {
public:
ParticleLayoutItem(const MaterialItems* materials);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment