15 #ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTLIBRARYEDITOR_H
16 #define BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTLIBRARYEDITOR_H
68 QVariant
data(
const QModelIndex&
index,
int role)
const override;
74 Ui::InstrumentLibraryEditor*
m_ui;
Defines class InstrumentsTreeModel.
Abstract base class for instrument-specific item classes.
A model extension for InstrumentsTreeModel which.
InstrumentItem * m_newInstrument
void setNewInstrument(InstrumentItem *addedInstrument)
Set the instrument which shall have a "NEW" sign in its icon.
TreeModel(QObject *parent, InstrumentCollection *model)
QVariant data(const QModelIndex &index, int role) const override
Ui::InstrumentLibraryEditor * m_ui
InstrumentLibraryEditor(QWidget *parent)
void onInstrumentChangedByEditor()
void createWidgetsForCurrentInstrument()
void onInstrumentDescriptionEdited(const QString &t)
void onCurrentChangedForChoose()
~InstrumentLibraryEditor() override
void setOffspecEnabled(bool b)
InstrumentItem * execChoose()
Execute the dialog for choosing an instrument from the library. Returns nullptr if canceled.
void onItemDoubleClickedForChoose(const QModelIndex &index)
QList< QAction * > getOverlayActions(const QModelIndex &index, bool asHover)
void execAdd(const InstrumentItem &instrumentToAdd)
Execute the dialog to add an instrument to the library.
void setGisasEnabled(bool b)
void setSpecularEnabled(bool b)
void onInstrumentNameEdited(const QString &newName)
InstrumentItem * m_chosenItem
void setDepthProbeEnabled(bool b)
Tree model for instrument item selection. Used e.g. for the instrument library.
QModelIndex parent(const QModelIndex &index) const override
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override