15 #ifndef BORNAGAIN_GUI_MODEL_PROJECT_PROJECTDOCUMENT_H
16 #define BORNAGAIN_GUI_MODEL_PROJECT_PROJECTDOCUMENT_H
58 Q_FLAG(Functionalities)
88 void save(
const QString& project_file_name,
bool autoSave =
false);
90 void saveProjectFile(
const QString& project_file_name,
bool autoSave =
false);
129 void writeTo(QIODevice* device);
151 Q_DECLARE_OPERATORS_FOR_FLAGS(ProjectDocument::Functionalities)
155 return QVariant(
static_cast<ProjectDocument::Functionalities::Int
>(f));
160 return static_cast<ProjectDocument::Functionalities
>(
161 v.value<ProjectDocument::Functionalities::Int>());
Defines class holding all application models.
Defines class InstrumentItem and all its children.
Defines class InstrumentsEditController.
Defines class LinkInstrumentManager.
Defines class MultiLayerItems.
ProjectDocument::Functionalities toFunctionalities(const QVariant &v)
QVariant toVariant(const ProjectDocument::Functionalities &f)
Defines class SimulationOptionsItem.
Provide read/write of heavy data files in a separate thread.
Class to modify the instruments list or a single instrument and provide the necessary signaling withi...
The LinkInstrumentManager class provides communication between InstrumentCollection and RealDataModel...
The service to collect messages from different senders.
Main model to hold sample items.
Project document class handles all data related to the opened project (sample, job,...
void singleSampleModeChanged()
Emitted when single sample mode has changed.
JobModel * jobModel() const
ApplicationModels m_applicationModels
RealDataModel * realDataModel() const
void setSingleInstrumentMode(bool b)
InstrumentCollection m_instruments
QString projectFileName() const
void setProjectDir(const QString &text)
void saveProjectData(const QString &project_file_name)
SimulationOptionsItem m_simulationOptionsItem
void singleInstrumentModeChanged()
Emitted when single instrument mode has changed.
QString documentVersion() const
void functionalitiesChanged()
Emitted when functionality has changed.
void setSingleSampleMode(bool b)
void saveProjectFile(const QString &project_file_name, bool autoSave=false)
QString projectName() const
InstrumentCollection * collectedItems() const
void setFunctionalities(const Functionalities &f)
void setProjectFileName(const QString &projectFileName)
bool hasValidNameAndPath()
MultiLayerItems m_sampleItems
LinkInstrumentManager * linkInstrumentManager()
ReadResult readProject(QIODevice *device, MessageService &messageService)
void setProjectName(const QString &text)
QString validProjectDir() const
ReadResult loadProjectFile(const QString &project_file_name, MessageService &messageService)
void writeTo(QIODevice *device)
bool m_singleInstrumentMode
Functionalities functionalities() const
MultiLayerItems * sampleItems()
InstrumentsEditController m_instrumentEditController
bool singleInstrumentMode() const
std::unique_ptr< LinkInstrumentManager > m_linkManager
DatafieldIOService * m_dataService
QString projectDir() const
void modified()
Emitted for any modifications in the document.
QString userExportDir() const
Returns directory name suitable for saving plots.
Functionalities m_functionalities
SimulationOptionsItem * simulationOptionsItem()
void save(const QString &project_file_name, bool autoSave=false)
InstrumentsEditController * instrumentsEditController()
The edit controller for the instruments in this project document.
bool singleSampleMode() const
The RealDataModel class is a model to store all imported RealDataItem's.
The SimulationOptionsItem class holds simulation status (run policy, number of threads,...