21 const QString external_field_tooltip =
"External field (A/m)";
25 QString::fromStdString(
"CrossCorrelationLength");
31 setToolTip(
"A multilayer to hold stack of layers");
36 .
setToolTip(
"Cross correlation length of roughnesses \n"
37 "between interfaces in nanometers");
51 QVector<SessionItem*> result;
60 for (
auto it = list.begin(); it != list.end(); ++it) {
61 if (it == list.begin())
66 if (it == list.begin() || it == (list.end() - 1)) {
Defines class MultiLayerItem.
Defines interface IParameterTranslator and subclasses.
Defines class VectorItem.
static const QString P_THICKNESS
static const QString P_ROUGHNESS
void setOnChildrenChange(std::function< void(SessionItem *)> f, const void *caller=0)
Calls back when number of children has changed, reports newChild.
QVector< SessionItem * > materialPropertyItems()
static const QString P_CROSS_CORR_LENGTH
static const QString T_LAYERS
static const QString P_EXTERNAL_FIELD
void setItemName(const QString &name)
Set item name, add property if necessary.
SessionItem * addProperty(const QString &name, const QVariant &variant)
Add new property item and register new tag.
SessionItem & setDecimals(int n)
bool registerTag(const QString &name, int min=0, int max=-1, QStringList modelTypes={})
Add new tag to this item with given name, min, max and types.
QVector< SessionItem * > getItems(const QString &tag="") const
Returns vector of all items of given tag.
ModelMapper * mapper()
Returns the current model mapper of this item. Creates new one if necessary.
void setDefaultTag(const QString &tag)
Set default tag.
void addTranslator(const IPathTranslator &translator)
SessionItem & setToolTip(const QString &tooltip)
QVector< SessionItem * > getChildrenOfType(const QString &model_type) const
Returns a vector of all children of the given type.