BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Definition at line 27 of file InstrumentCollection.h.
Public Member Functions | |
~InstrumentCollection () | |
template<typename T > | |
T * | addInstrument () |
void | clear () |
QVector< InstrumentItem * > | collectedItems () const |
void | emplace_back (InstrumentItem *item) |
InstrumentItem * | findInstrumentById (const QString &instrumentId) const |
InstrumentItem * | insertCopy (const InstrumentItem &source) |
Inserts a deep copy (also of any non xml data in a pointwise axis) The id will not be copied, but a new unique one will be created Returns the newly created instrument. More... | |
QVector< Instrument2DItem * > | instrument2DItems () const |
bool | instrumentExists (const QString &instrumentId) const |
QVector< InstrumentItem * > | instrumentItems (const std::function< bool(const InstrumentItem *)> &accept) const |
QStringList | instrumentNames () const |
void | removeInstrument (InstrumentItem *instrument) |
void | serialize (Streamer &s) |
QString | suggestInstrumentName (const QString &baseName) const |
Private Attributes | |
QVector< InstrumentItem * > | m_instruments |
InstrumentCollection::~InstrumentCollection | ( | ) |
Definition at line 22 of file InstrumentCollection.cpp.
References m_instruments.
|
inline |
Definition at line 32 of file InstrumentCollection.h.
References m_instruments.
Referenced by InstrumentsEditController::addInstrument().
void InstrumentCollection::clear | ( | ) |
Definition at line 27 of file InstrumentCollection.cpp.
References m_instruments.
Referenced by InstrumentLibrary::load().
QVector< InstrumentItem * > InstrumentCollection::collectedItems | ( | ) | const |
Definition at line 47 of file InstrumentCollection.cpp.
References m_instruments.
Referenced by InstrumentListModel::addNewInstrument(), InstrumentLibrary::collectedItems(), SimulationView::collectedItems(), InstrumentListModel::copyInstrument(), InstrumentListModel::data(), findInstrumentById(), instrument2DItems(), InstrumentListModel::instrumentForIndex(), instrumentItems(), instrumentNames(), InstrumentLibrary::isEmpty(), InstrumentListModel::onInstrumentNameChanged(), ProjectSettingsView::onSingleInstrumentRadioToggled(), InstrumentListModel::rowCount(), and RealDataPropertiesWidget::updateInstrumentComboEntries().
|
inline |
Definition at line 44 of file InstrumentCollection.h.
References m_instruments.
Referenced by GUI::Transform::FromCore::itemizeInstruments().
InstrumentItem * InstrumentCollection::findInstrumentById | ( | const QString & | instrumentId | ) | const |
Definition at line 86 of file InstrumentCollection.cpp.
References collectedItems().
Referenced by LinkInstrumentManager::canLinkDataToInstrument(), instrumentExists(), and RealDataPropertiesWidget::onInstrumentComboIndexChanged().
InstrumentItem * InstrumentCollection::insertCopy | ( | const InstrumentItem & | source | ) |
Inserts a deep copy (also of any non xml data in a pointwise axis) The id will not be copied, but a new unique one will be created Returns the newly created instrument.
Definition at line 39 of file InstrumentCollection.cpp.
References InstrumentItem::createCopy(), m_instruments, InstrumentItem::setId(), and GUI::View::PropertyEditorFactory::toString().
Referenced by InstrumentsEditController::addCopy().
QVector< Instrument2DItem * > InstrumentCollection::instrument2DItems | ( | ) | const |
Definition at line 76 of file InstrumentCollection.cpp.
References collectedItems().
bool InstrumentCollection::instrumentExists | ( | const QString & | instrumentId | ) | const |
Definition at line 95 of file InstrumentCollection.cpp.
References findInstrumentById().
Referenced by LinkInstrumentManager::onInstrumentAddedOrRemoved().
QVector< InstrumentItem * > InstrumentCollection::instrumentItems | ( | const std::function< bool(const InstrumentItem *)> & | accept | ) | const |
Definition at line 65 of file InstrumentCollection.cpp.
References collectedItems().
Referenced by InstrumentsTreeModel::instruments().
QStringList InstrumentCollection::instrumentNames | ( | ) | const |
Definition at line 52 of file InstrumentCollection.cpp.
References collectedItems().
Referenced by suggestInstrumentName(), and SimulationView::writeOptionsToUI().
void InstrumentCollection::removeInstrument | ( | InstrumentItem * | instrument | ) |
Definition at line 100 of file InstrumentCollection.cpp.
References m_instruments.
Referenced by InstrumentsEditController::removeInstrument(), and InstrumentsTreeModel::removeItem().
void InstrumentCollection::serialize | ( | Streamer & | s | ) |
Definition at line 33 of file InstrumentCollection.cpp.
References Streamer::assertVersion(), and m_instruments.
Referenced by InstrumentLibrary::load(), ProjectDocument::readProject(), InstrumentLibrary::saveIfModified(), and ProjectDocument::writeTo().
QString InstrumentCollection::suggestInstrumentName | ( | const QString & | baseName | ) | const |
Definition at line 60 of file InstrumentCollection.cpp.
References GUI::Util::Path::baseName(), instrumentNames(), and GUI::Util::String::suggestName().
Referenced by InstrumentListModel::addNewInstrument(), InstrumentListModel::copyInstrument(), and InstrumentLibrary::suggestName().
|
private |
Definition at line 63 of file InstrumentCollection.h.
Referenced by ~InstrumentCollection(), addInstrument(), clear(), collectedItems(), emplace_back(), insertCopy(), removeInstrument(), and serialize().