24 const QString T_CHILDREN =
"children tag";
26 QStringList() <<
"Parameter Label"
53 item->setValue(newValue);
78 const QString T_CHILDREN =
"children tag";
79 registerTag(T_CHILDREN, 0, -1, QStringList() <<
"Parameter Label");
#define ASSERT(condition)
Defines class FitParameterHelper.
Defines ModelPath namespace.
Defines classes for ParameterTreeItems.
Defines class SessionModel.
SessionItem * linkedItem()
Returns corresponding linked item in MultiLayerItem/IsntrumentItem.
static const QString P_DOMAIN
static const QString P_LINK
void propagateValueToLink(double newValue)
Sets current value to the original PropertyItem of MultiLayerItem/InstrumentItem.
void restoreFromBackup()
Restore the value from backup and propagate it to the linked item.
static const QString P_BACKUP
QString itemName() const
Get item name, return display name if no name is set.
SessionItem * addProperty(const QString &name, const QVariant &variant)
Add new property item and register new tag.
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.
bool setValue(QVariant value)
Set value, ensure that variant types match.
QVariant getItemValue(const QString &tag) const
Directly access value of item under given tag.
void setDefaultTag(const QString &tag)
Set default tag.
SessionModel * model() const
Returns model of this item.
T * item(const QString &tag) const
SessionItem * itemForIndex(const QModelIndex &index) const
QModelIndex getIndexFromPath(const SessionModel *model, const QString &path)
const SessionItem * ancestor(const SessionItem *item, const QString &requiredModelType)
Returns ancestor of given modelType for given item.