BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
SaveThread Class Reference

Description

Performs saving of heavy intensity data in a thread.

Definition at line 25 of file SaveThread.h.

Inheritance diagram for SaveThread:
[legend]
Collaboration diagram for SaveThread:
[legend]

Signals

void saveReady ()
 

Public Member Functions

 SaveThread (QObject *parent=nullptr)
 
 ~SaveThread () override
 
void run () override
 
void setSaveContext (ProjectDocument *document, const QString &project_file_name)
 

Private Attributes

ProjectDocumentm_document
 
QString m_projectFile
 

Constructor & Destructor Documentation

◆ SaveThread()

SaveThread::SaveThread ( QObject *  parent = nullptr)
explicit

Definition at line 19 of file SaveThread.cpp.

20  : QThread(parent)
21  , m_document(nullptr)
22 {
23 }
ProjectDocument * m_document
Definition: SaveThread.h:39

◆ ~SaveThread()

SaveThread::~SaveThread ( )
override

Definition at line 25 of file SaveThread.cpp.

26 {
27  wait();
28 }

Member Function Documentation

◆ run()

void SaveThread::run ( )
override

Definition at line 30 of file SaveThread.cpp.

31 {
32  ASSERT(m_document);
34  emit saveReady();
35 }
void saveProjectData(const QString &project_file_name)
QString m_projectFile
Definition: SaveThread.h:40
void saveReady()

References m_document, m_projectFile, ProjectDocument::saveProjectData(), and saveReady().

Here is the call graph for this function:

◆ saveReady

void SaveThread::saveReady ( )
signal

Referenced by SaveService::process_queue(), and run().

◆ setSaveContext()

void SaveThread::setSaveContext ( ProjectDocument document,
const QString &  project_file_name 
)

Definition at line 37 of file SaveThread.cpp.

38 {
39  m_document = document;
40  m_projectFile = project_file_name;
41 }

References m_document, and m_projectFile.

Member Data Documentation

◆ m_document

ProjectDocument* SaveThread::m_document
private

Definition at line 39 of file SaveThread.h.

Referenced by run(), and setSaveContext().

◆ m_projectFile

QString SaveThread::m_projectFile
private

Definition at line 40 of file SaveThread.h.

Referenced by run(), and setSaveContext().


The documentation for this class was generated from the following files: