BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
SaveThread.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Project/SaveThread.cpp
6 //! @brief Defines SaveThread classes
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 
16 #include "Base/Util/Assert.h"
18 
19 SaveThread::SaveThread(QObject* parent)
20  : QThread(parent)
21  , m_document(nullptr)
22 {
23 }
24 
26 {
27  wait();
28 }
29 
31 {
32  ASSERT(m_document);
34  emit saveReady();
35 }
36 
37 void SaveThread::setSaveContext(ProjectDocument* document, const QString& project_file_name)
38 {
39  m_document = document;
40  m_projectFile = project_file_name;
41 }
Defines class ProjectDocument.
Defines SaveThread classes.
Project document class handles all data related to the opened project (sample, job,...
void saveProjectData(const QString &project_file_name)
ProjectDocument * m_document
Definition: SaveThread.h:39
QString m_projectFile
Definition: SaveThread.h:40
void run() override
Definition: SaveThread.cpp:30
void saveReady()
SaveThread(QObject *parent=nullptr)
Definition: SaveThread.cpp:19
void setSaveContext(ProjectDocument *document, const QString &project_file_name)
Definition: SaveThread.cpp:37
~SaveThread() override
Definition: SaveThread.cpp:25