37 #include <QtCore/QXmlStreamWriter>
41 , m_documentModel(nullptr)
42 , m_materialModel(nullptr)
43 , m_instrumentModel(nullptr)
44 , m_sampleModel(nullptr)
45 , m_realDataModel(nullptr)
131 model->writeTo(writer);
139 if (model->getModelTag() == reader->name()) {
140 model->readFrom(reader, messageService);
146 reader->raiseError(ex.
text());
156 QList<SessionModel*> result;
177 Qt::UniqueConnection);
179 Qt::UniqueConnection);
181 Qt::UniqueConnection);
Defines class holding all application models.
#define ASSERT(condition)
Defines class DeserializationException.
Defines class DocumentModel.
Defines GUIObjectBuilder namespace.
Defines ImportDataUtils namespace.
Defines InstrumentItems classes.
Defines class InstrumentModel.
Defines class IntensityDataIOFactory.
Defines class IntensityDataItem.
Defines class MaterialModel.
Defines MaterialPropertyController class.
Defines MessageService class.
Defines class MultiLayer.
Defines class OffSpecularSimulation.
Defines class RealDataItem.
Defines class RealDataModel.
Defines class SampleBuilderFactory.
Defines class SampleModel.
Defines class SimulationOptionsItem.
Defines namespace and functions for standard simulations.
SampleModel * sampleModel()
MaterialPropertyController * m_materialPropertyController
RealDataModel * realDataModel()
SampleModel * m_sampleModel
MaterialModel * materialModel()
QList< SessionModel * > modelList()
Returns the list of all GUI models.
void connectModel(SessionModel *model)
QVector< SessionItem * > nonXMLItems() const
Returns all non-XML items.
MaterialModel * m_materialModel
void readFrom(class QXmlStreamReader *reader, MessageService *messageService)
RealDataModel * m_realDataModel
void writeTo(class QXmlStreamWriter *writer)
Writes all model in file one by one.
ApplicationModels(QObject *parent=nullptr)
DocumentModel * m_documentModel
DocumentModel * documentModel()
InstrumentModel * instrumentModel()
void resetModels()
reset all models to initial state
InstrumentModel * m_instrumentModel
The DocumentModel class is a model with GUI settings related to the opened project.
QVector< SessionItem * > nonXMLItems() const override
QVector< SessionItem * > nonXMLItems() const override
MaterialItem * addRefractiveMaterial(const QString &name, double delta, double beta)
Listens MaterialModel for changes in MaterialItems and then updates MaterialProperties in all related...
void setModels(MaterialModel *materialModel, SampleModel *sampleModel)
void onMaterialModelLoad()
Special case when original MaterialModel was fully rebuild from MaterialEditor.
The service to collect messages from different senders.
The RealDataModel class is a model to store all imported RealDataItem's.
void setInstrumentModel(InstrumentModel *instrumentModel)
virtual QVector< SessionItem * > nonXMLItems() const override
Main model to hold sample items.
void setItemName(const QString &name)
Set item name, add property if necessary.
T * insertItem(SessionItem *parent=nullptr, int row=-1, QString tag="")
The SimulationOptionsItem class holds simulation status (run policy, number of threads,...