39 QVector<SessionItem*> result;
41 for (
auto instrument_item : topItems<SpecularInstrumentItem>()) {
42 auto axis_group = instrument_item->beamItem()
46 if (
auto pointwise_axis = axis_group->getChildOfType(
"PointwiseAxis"))
47 result.push_back(pointwise_axis);
64 instrumentItem->mapper()->setOnPropertyChange(
65 [
this, instrumentItem](
const QString&
name) {
77 return topItems<InstrumentItem>();
83 if (instrument->id() == instrumentId)
101 instrumentItem->mapper()->unsubscribe(
this);
103 instrumentItem->mapper()->setOnPropertyChange(
104 [
this, instrumentItem](
const QString&
name) {
114 const QString& propertyName)
Defines InstrumentItems classes.
Defines class InstrumentModel.
Declares the class SpecularBeamInclinationItem.
static const QString P_INCLINATION_ANGLE
InstrumentModel * createCopy(SessionItem *parent=nullptr) override
void instrumentNameChanged(const InstrumentItem *instrument)
bool instrumentExists(const QString &instrumentId) const
InstrumentItem * findInstrumentById(const QString &instrumentId) const
QVector< SessionItem * > nonXMLItems() const override
InstrumentModel(QObject *parent=nullptr)
void onRowsChange(const QModelIndex &parent, int, int)
virtual void readFrom(QXmlStreamReader *reader, MessageService *messageService=0) override
void onInstrumentPropertyChange(const InstrumentItem *instrument, const QString &propertyName)
~InstrumentModel() override
QVector< InstrumentItem * > instrumentItems() const
void instrumentAddedOrRemoved()
The service to collect messages from different senders.
static const QString P_NAME
virtual QModelIndex parent(const QModelIndex &child) const
virtual void initFrom(SessionModel *model, SessionItem *parent)
virtual void readFrom(QXmlStreamReader *reader, MessageService *messageService=0)
static const QString P_ALPHA_AXIS
QString const & name(EShape k)
const QString InstrumentModelTag("InstrumentModel")