15 #ifndef BORNAGAIN_GUI_VIEW_MATERIALEDITOR_MATERIALEDITORMODEL_H
16 #define BORNAGAIN_GUI_VIEW_MATERIALEDITOR_MATERIALEDITORMODEL_H
18 #include <QAbstractItemModel>
31 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
32 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
33 QVariant
data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
34 QVariant
headerData(
int section, Qt::Orientation orientation,
35 int role = Qt::DisplayRole)
const override;
38 void setColor(
const QModelIndex& index,
const QColor& color);
39 void setX(
const QModelIndex& index,
double value);
40 void setY(
const QModelIndex& index,
double value);
41 void setZ(
const QModelIndex& index,
double value);
42 void setDelta(
const QModelIndex& index,
double value);
43 void setBeta(
const QModelIndex& index,
double value);
44 void setRe(
const QModelIndex& index,
double value);
45 void setIm(
const QModelIndex& index,
double value);
51 QModelIndex
first()
const;
Model for list of materials, used in MaterialEditorDialog.
MaterialItem * materialFromIndex(const QModelIndex &index) const
void setDelta(const QModelIndex &index, double value)
QModelIndex indexFromMaterial(const MaterialItem *m) const
MaterialItem * addRefractiveMaterial(const QString &name, double delta, double beta)
void setY(const QModelIndex &index, double value)
void setColor(const QModelIndex &index, const QColor &color)
void setRe(const QModelIndex &index, double value)
int rowCount(const QModelIndex &parent=QModelIndex()) const override
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
void setIm(const QModelIndex &index, double value)
MaterialItem * addSLDMaterial(const QString &name, double sld, double abs_term)
void setZ(const QModelIndex &index, double value)
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
void setX(const QModelIndex &index, double value)
MaterialItem * cloneMaterial(const QModelIndex &index)
MaterialEditorModel(MaterialItems *p)
void removeMaterial(const QModelIndex &index)
void setMaterialItemName(const QModelIndex &index, const QString &name)
QModelIndex first() const
int columnCount(const QModelIndex &parent=QModelIndex()) const override
void setBeta(const QModelIndex &index, double value)
QString const & name(EShape k)