BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
OutputDataIOService.h
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
4
//
5
//! @file GUI/coregui/mainwindow/OutputDataIOService.h
6
//! @brief Defines class OutputDataIOService
7
//!
8
//! @homepage http://www.bornagainproject.org
9
//! @license GNU General Public License v3 or higher (see COPYING)
10
//! @copyright Forschungszentrum Jülich GmbH 2018
11
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12
//
13
// ************************************************************************************************
14
15
#ifndef BORNAGAIN_GUI_COREGUI_MAINWINDOW_OUTPUTDATAIOSERVICE_H
16
#define BORNAGAIN_GUI_COREGUI_MAINWINDOW_OUTPUTDATAIOSERVICE_H
17
18
#include "
GUI/coregui/mainwindow/OutputDataIOHistory.h
"
19
#include <QObject>
20
21
class
ApplicationModels
;
22
class
MessageService
;
23
class
SaveLoadInterface
;
24
25
//! Provide read/write of heavy data files in a separate thread.
26
//!
27
//! Listens all models and keep tracks of changes in items. Provides logic to
28
//! not to re-save already saved data.
29
30
class
OutputDataIOService
:
public
QObject {
31
Q_OBJECT
32
public
:
33
explicit
OutputDataIOService
(QObject* parent =
nullptr
);
34
explicit
OutputDataIOService
(
ApplicationModels
* models, QObject* parent =
nullptr
);
35
36
void
setApplicationModels
(
ApplicationModels
* models);
37
38
void
save
(
const
QString&
projectDir
);
39
40
void
load
(
const
QString&
projectDir
,
MessageService
* messageService =
nullptr
);
41
42
QVector<SaveLoadInterface*>
nonXMLItems
()
const
;
43
44
private
:
45
void
cleanOldFiles
(
const
QString&
projectDir
,
const
QStringList& oldSaves,
46
const
QStringList& newSaves);
47
48
OutputDataIOHistory
m_history
;
49
ApplicationModels
*
m_applicationModels
;
50
};
51
52
#endif
// BORNAGAIN_GUI_COREGUI_MAINWINDOW_OUTPUTDATAIOSERVICE_H
OutputDataIOHistory.h
Defines OutputDataIOHistory classes.
ApplicationModels
Definition:
ApplicationModels.h:31
MessageService
The service to collect messages from different senders.
Definition:
MessageService.h:28
OutputDataIOHistory
Save history information for set of directories.
Definition:
OutputDataIOHistory.h:68
OutputDataIOService
Provide read/write of heavy data files in a separate thread.
Definition:
OutputDataIOService.h:30
OutputDataIOService::load
void load(const QString &projectDir, MessageService *messageService=nullptr)
Definition:
OutputDataIOService.cpp:68
OutputDataIOService::setApplicationModels
void setApplicationModels(ApplicationModels *models)
Definition:
OutputDataIOService.cpp:41
OutputDataIOService::nonXMLItems
QVector< SaveLoadInterface * > nonXMLItems() const
Returns all non-XML items available for save/load.
Definition:
OutputDataIOService.cpp:102
OutputDataIOService::m_applicationModels
ApplicationModels * m_applicationModels
Definition:
OutputDataIOService.h:49
OutputDataIOService::m_history
OutputDataIOHistory m_history
Definition:
OutputDataIOService.h:48
OutputDataIOService::OutputDataIOService
OutputDataIOService(QObject *parent=nullptr)
Definition:
OutputDataIOService.cpp:28
OutputDataIOService::save
void save(const QString &projectDir)
Definition:
OutputDataIOService.cpp:46
OutputDataIOService::cleanOldFiles
void cleanOldFiles(const QString &projectDir, const QStringList &oldSaves, const QStringList &newSaves)
Clean old saved files.
Definition:
OutputDataIOService.cpp:119
SaveLoadInterface
Purely virtual interface to handle non-XML data save and load.
Definition:
SaveLoadInterface.h:24
ProjectUtils::projectDir
QString projectDir(const QString &projectFileName)
Returns project directory deduced from project file name.
Definition:
ProjectUtils.cpp:32
GUI
coregui
mainwindow
OutputDataIOService.h
Generated by
1.9.1