BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
JobProgressAssistant.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Job/JobProgressAssistant.cpp
6 //! @brief Implements class JobProgressAssistant
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 
18 #include <QProgressBar>
19 
21  : QObject(mainWindow)
22  , m_mainWindow(mainWindow)
23 {
25 }
26 
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 }
Defines class JobModel.
Defines class JobProgressAssistant.
Defines class MainWindow.
void globalProgress(int)
JobProgressAssistant(MainWindow *mainWindow, JobModel *jobModel)
void onGlobalProgress(int progress)
QProgressBar * progressBar()
Definition: MainWindow.cpp:117
static QMainWindow * mainWindow
Definition: Globals.h:22