diff --git a/GUI/Model/Sim/InstrumentItems.cpp b/GUI/Model/Sim/InstrumentItems.cpp index 2da8d01b3ba86bb4320fce0d02a0a11ce172ef67..2b7b1d7039d20261c5da237927da9a1fbe315165 100644 --- a/GUI/Model/Sim/InstrumentItems.cpp +++ b/GUI/Model/Sim/InstrumentItems.cpp @@ -180,9 +180,9 @@ Frame InstrumentItem::makeFrame() const // ************************************************************************************************ ScanningInstrumentItem::ScanningInstrumentItem(double intensity) - : m_scan_item(new ScanItem()) + : m_scan(new ScanItem()) { - m_scan_item->intensity().setDVal(intensity); // overwrite default value set by BeamItem c'tor + m_scan->intensity().setDVal(intensity); // overwrite default value set by BeamItem c'tor } //! Takes ownership of argument 'axis'. @@ -228,7 +228,7 @@ void ScanningInstrumentItem::writeTo(QXmlStreamWriter* w) const { XML::writeAttribute(w, XML::Attrib::version, uint(1)); XML::writeBaseElement<InstrumentItem>(w, this); - XML::writeTaggedElement(w, Tag::Scan, *m_scan_item); + XML::writeTaggedElement(w, Tag::Scan, *m_scan); } void ScanningInstrumentItem::readFrom(QXmlStreamReader* r) @@ -241,7 +241,7 @@ void ScanningInstrumentItem::readFrom(QXmlStreamReader* r) if (tag == Tag::BaseData) XML::readBaseElement<InstrumentItem>(r, this); else if (tag == Tag::Scan) - XML::readTaggedElement(r, tag, *m_scan_item); + XML::readTaggedElement(r, tag, *m_scan); else r->skipCurrentElement(); } @@ -252,8 +252,8 @@ void ScanningInstrumentItem::readFrom(QXmlStreamReader* r) // ************************************************************************************************ Scatter2DInstrumentItem::Scatter2DInstrumentItem() - : m_beam_item(std::make_unique<BeamItem>()) - , m_detector_item(std::make_unique<DetectorItem>()) + : m_beam(std::make_unique<BeamItem>()) + , m_detector(std::make_unique<DetectorItem>()) { setName("GISAS"); } @@ -309,8 +309,8 @@ void Scatter2DInstrumentItem::writeTo(QXmlStreamWriter* w) const { XML::writeAttribute(w, XML::Attrib::version, uint(1)); XML::writeBaseElement<InstrumentItem>(w, this); - XML::writeTaggedElement(w, Tag::Beam, *m_beam_item); - XML::writeTaggedElement(w, Tag::Detector, *m_detector_item); + XML::writeTaggedElement(w, Tag::Beam, *m_beam); + XML::writeTaggedElement(w, Tag::Detector, *m_detector); } void Scatter2DInstrumentItem::readFrom(QXmlStreamReader* r) @@ -323,9 +323,9 @@ void Scatter2DInstrumentItem::readFrom(QXmlStreamReader* r) if (tag == Tag::BaseData) XML::readBaseElement<InstrumentItem>(r, this); else if (tag == Tag::Beam) - XML::readTaggedElement(r, tag, *m_beam_item); + XML::readTaggedElement(r, tag, *m_beam); else if (tag == Tag::Detector) - XML::readTaggedElement(r, tag, *m_detector_item); + XML::readTaggedElement(r, tag, *m_detector); else r->skipCurrentElement(); } diff --git a/GUI/Model/Sim/InstrumentItems.h b/GUI/Model/Sim/InstrumentItems.h index d4907697436817e6d20429fc4a2323bbd6a6f3bb..6e9b669111964dd88e22b0396875eb8a6e6b3dd3 100644 --- a/GUI/Model/Sim/InstrumentItems.h +++ b/GUI/Model/Sim/InstrumentItems.h @@ -106,7 +106,7 @@ protected: class ScanningInstrumentItem : public InstrumentItem { public: ScanningInstrumentItem(double intensity); - ScanItem* scanItem() const { return m_scan_item.get(); } + ScanItem* scanItem() const { return m_scan.get(); } std::unique_ptr<PhysicalScan> createScan(const Scale& axis) const; @@ -114,7 +114,7 @@ public: void readFrom(QXmlStreamReader* r) override; private: - std::unique_ptr<ScanItem> m_scan_item; + std::unique_ptr<ScanItem> m_scan; }; @@ -131,14 +131,14 @@ public: void writeTo(QXmlStreamWriter* w) const override; void readFrom(QXmlStreamReader* r) override; - BeamItem* beamItem() const { return m_beam_item.get(); } - DetectorItem* detectorItem() const { return m_detector_item.get(); } + BeamItem* beamItem() const { return m_beam.get(); } + DetectorItem* detectorItem() const { return m_detector.get(); } std::unique_ptr<IDetector> normalDetector() const; private: - std::unique_ptr<BeamItem> m_beam_item; - std::unique_ptr<DetectorItem> m_detector_item; + std::unique_ptr<BeamItem> m_beam; + std::unique_ptr<DetectorItem> m_detector; };