Mantid
|
#include <AlgorithmProgressPresenter.h>
Public Member Functions | |
void | algorithmEndedSlot (Mantid::API::AlgorithmID) override |
AlgorithmProgressPresenter (QWidget *parent, IAlgorithmProgressWidget *) | |
void | algorithmStartedSlot (Mantid::API::AlgorithmID) override |
AlgorithmProgressModel & | model () |
void | updateProgressBarSlot (Mantid::API::AlgorithmID, const double, const QString, const double, const int) override |
This slot is triggered whenever an algorithm reports progress. More... | |
Public Member Functions inherited from MantidQt::MantidWidgets::AlgorithmProgressPresenterBase | |
void | algorithmEnded (Mantid::API::AlgorithmID) |
Signals to the presenters that an algorithm has ended. More... | |
virtual void | algorithmEndedSlot (Mantid::API::AlgorithmID)=0 |
AlgorithmProgressPresenterBase (QObject *parent) | |
void | algorithmStarted (Mantid::API::AlgorithmID) |
Signals to the presenters that an algorithm has started. More... | |
virtual void | algorithmStartedSlot (Mantid::API::AlgorithmID)=0 |
void | setProgressBar (QProgressBar *, const double, const QString &, const double, const int) |
Sets the parameter progress bar to show the progress and message. More... | |
void | updateProgressBar (Mantid::API::AlgorithmID, double, const std::string &, const double estimatedTime, const int progressPrecision) |
Signals to the presenters that there has been progress in one of the algorithms. More... | |
virtual void | updateProgressBarSlot (Mantid::API::AlgorithmID, const double, const QString, const double, const int)=0 |
Private Attributes | |
Mantid::API::AlgorithmID | m_algorithm |
The algorithm for which a progress bar is currently being controlled. More... | |
AlgorithmProgressModel | m_model |
The model which observes events happening to the algorithms. More... | |
Mantid::Kernel::Timer | m_timer |
Atimer to meaure how long since the last progress report. More... | |
IAlgorithmProgressWidget * | m_view |
The view that contains the progress widget. More... | |
Additional Inherited Members | |
Signals inherited from MantidQt::MantidWidgets::AlgorithmProgressPresenterBase | |
void | algorithmEndedSignal (Mantid::API::AlgorithmID) |
void | algorithmStartedSignal (Mantid::API::AlgorithmID) |
void | updateProgressBarSignal (Mantid::API::AlgorithmID, double progress, QString message, double estimatedTime, int progressPrecision) |
Definition at line 36 of file AlgorithmProgressPresenter.h.
MantidQt::MantidWidgets::AlgorithmProgressPresenter::AlgorithmProgressPresenter | ( | QWidget * | parent, |
IAlgorithmProgressWidget * | view | ||
) |
Definition at line 11 of file AlgorithmProgressPresenter.cpp.
|
overridevirtual |
Implements MantidQt::MantidWidgets::AlgorithmProgressPresenterBase.
Definition at line 24 of file AlgorithmProgressPresenter.cpp.
References MantidQt::MantidWidgets::IAlgorithmProgressWidget::algorithmEnded(), m_algorithm, and m_view.
|
overridevirtual |
Implements MantidQt::MantidWidgets::AlgorithmProgressPresenterBase.
Definition at line 15 of file AlgorithmProgressPresenter.cpp.
References MantidQt::MantidWidgets::IAlgorithmProgressWidget::algorithmStarted(), m_algorithm, and m_view.
|
inline |
Definition at line 46 of file AlgorithmProgressPresenter.h.
|
overridevirtual |
This slot is triggered whenever an algorithm reports progress.
If the algorithm is not being tracked, then the progress bar isn't changed. This can happen whenever there are multiple algorithms running simultaneously - the progress bar will only show the progress of the first one that started. If many algorithms are starting, this prevents having a very jittery progress bar, that never completely fills up
algorithm | The ID of the algorithm that is reporting progress |
progress | The progress that the algorithm has reported |
message | The message that the algorithm has reported. It can be emitted from another thread, so a copy of the message is forced |
estimatedTime | :: estimated time to completion in seconds |
progressPrecision | :: number of digits after the decimal |
Implements MantidQt::MantidWidgets::AlgorithmProgressPresenterBase.
Definition at line 43 of file AlgorithmProgressPresenter.cpp.
References Mantid::Kernel::Timer::elapsed_no_reset(), m_algorithm, m_timer, m_view, Mantid::Kernel::Timer::reset(), and MantidQt::MantidWidgets::IAlgorithmProgressWidget::updateProgress().
|
private |
The algorithm for which a progress bar is currently being controlled.
Definition at line 52 of file AlgorithmProgressPresenter.h.
Referenced by algorithmEndedSlot(), algorithmStartedSlot(), and updateProgressBarSlot().
|
private |
The model which observes events happening to the algorithms.
Definition at line 50 of file AlgorithmProgressPresenter.h.
|
private |
Atimer to meaure how long since the last progress report.
Definition at line 57 of file AlgorithmProgressPresenter.h.
Referenced by updateProgressBarSlot().
|
private |
The view that contains the progress widget.
The creator of the view also owns the view (Python), not this presenter.
Definition at line 55 of file AlgorithmProgressPresenter.h.
Referenced by algorithmEndedSlot(), algorithmStartedSlot(), and updateProgressBarSlot().