Skip to content
Snippets Groups Projects
Commit 3c74b637 authored by Van Herck, Walter's avatar Van Herck, Walter
Browse files

added ParticleDecorationItem

parent 0d574350
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@
#include "ItemFactory.h"
#include "MultiLayerItem.h"
#include "LayerItem.h"
#include "ParticleDecorationItem.h"
ParameterizedItem *ItemFactory::createItem(const QString &model_name)
......@@ -26,5 +27,8 @@ ParameterizedItem *ItemFactory::createItem(const QString &model_name)
if (model_name==QString("Layer")) {
return new LayerItem();
}
if (model_name==QString("ParticleDecoration")) {
return new ParticleDecorationItem();
}
return 0;
}
// ************************************************************************** //
//
// BornAgain: simulate and fit scattering at grazing incidence
//
//! @file Models/ParticleDecorationItem.cpp
//! @brief Implements class ParticleDecorationItem.
//!
//! @homepage http://apps.jcns.fz-juelich.de/BornAgain
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2013
//! @authors Scientific Computing Group at MLZ Garching
//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke
//
// ************************************************************************** //
#include "ParticleDecorationItem.h"
ParticleDecorationItem::ParticleDecorationItem()
: ParameterizedItem(QString("ParticleDecoration"))
{
m_valid_parents.append(QString("Layer"));
}
ParticleDecorationItem::~ParticleDecorationItem()
{
}
// ************************************************************************** //
//
// BornAgain: simulate and fit scattering at grazing incidence
//
//! @file Models/ParticleDecorationItem.h
//! @brief Defines class ParticleDecorationItem.
//!
//! @homepage http://apps.jcns.fz-juelich.de/BornAgain
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2013
//! @authors Scientific Computing Group at MLZ Garching
//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke
//
// ************************************************************************** //
#ifndef PARTICLEDECORATIONITEM_H
#define PARTICLEDECORATIONITEM_H
#include "ParameterizedItem.h"
class ParticleDecorationItem : public ParameterizedItem
{
public:
ParticleDecorationItem();
~ParticleDecorationItem();
};
#endif // PARTICLEDECORATIONITEM_H
......@@ -79,8 +79,9 @@ void SampleView::initSubWindows()
SessionModel *session_model = new SessionModel();
// Temporary for testing
QStandardItem *multilayer = session_model->insertNewItem("MultiLayer", QModelIndex());
QStandardItem *layer = session_model->insertNewItem("Layer", QModelIndex());
session_model->insertNewItem("Layer", multilayer->index());
QStandardItem *layer = session_model->insertNewItem("Layer", multilayer->index());
session_model->insertNewItem("ParticleDecoration", layer->index());
session_model->insertNewItem("Layer", QModelIndex());
// END temporary
m_subWindows[SampleTreeView] = SampleViewComponents::createTreeView(session_model, this);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment