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

Description

The JobProgressAssistant class helps JobView to visualize current progress.

Definition at line 25 of file JobProgressAssistant.h.

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

Public Member Functions

 JobProgressAssistant (MainWindow *mainWindow, JobModel *jobModel)
 

Private Slots

void onGlobalProgress (int progress)
 

Private Attributes

MainWindowm_mainWindow
 

Constructor & Destructor Documentation

◆ JobProgressAssistant()

JobProgressAssistant::JobProgressAssistant ( MainWindow mainWindow,
JobModel jobModel 
)

Definition at line 20 of file JobProgressAssistant.cpp.

21  : QObject(mainWindow)
23 {
25 }
void globalProgress(int)
void onGlobalProgress(int progress)
static QMainWindow * mainWindow
Definition: Globals.h:22

References JobModel::globalProgress(), and onGlobalProgress().

Here is the call graph for this function:

Member Function Documentation

◆ onGlobalProgress

void JobProgressAssistant::onGlobalProgress ( int  progress)
privateslot

Definition at line 27 of file JobProgressAssistant.cpp.

28 {
29  ASSERT(m_mainWindow->progressBar());
30  if (progress < 0 || progress >= 100)
31  m_mainWindow->progressBar()->hide();
32  else {
33  m_mainWindow->progressBar()->show();
34  m_mainWindow->progressBar()->setValue(progress);
35  }
36 }
QProgressBar * progressBar()
Definition: MainWindow.cpp:117

References m_mainWindow, and MainWindow::progressBar().

Referenced by JobProgressAssistant().

Here is the call graph for this function:

Member Data Documentation

◆ m_mainWindow

MainWindow* JobProgressAssistant::m_mainWindow
private

Definition at line 34 of file JobProgressAssistant.h.

Referenced by onGlobalProgress().


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