Mantid
|
#include <AlgorithmProgressDialogPresenter.h>
Public Member Functions | |
void | algorithmEndedSlot (Mantid::API::AlgorithmID) override |
This slot is triggered whenever an algorithms ends. More... | |
AlgorithmProgressDialogPresenter (QWidget *parent, IAlgorithmProgressDialogWidget *view, AlgorithmProgressModel &model) | |
void | algorithmStartedSlot (Mantid::API::AlgorithmID) override |
This slot is triggered whenever an algorithm has started executing. More... | |
size_t | getNumberTrackedAlgorithms () |
void | updateProgressBarSlot (Mantid::API::AlgorithmID, const double progress, const QString message, const double estimatedTime, const int progressPrecision) 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 Types | |
using | RunningAlgorithms = std::unordered_map< Mantid::API::AlgorithmID, std::pair< QTreeWidgetItem *, QProgressBar * > > |
Private Attributes | |
AlgorithmProgressModel & | m_model |
Reference to the model of the main window progress bar. More... | |
RunningAlgorithms | m_progressBars |
Container for all the progress bars that are currently being displayed This container does NOT own any of the progress bars. More... | |
IAlgorithmProgressDialogWidget * | m_view |
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 26 of file AlgorithmProgressDialogPresenter.h.
|
private |
Definition at line 28 of file AlgorithmProgressDialogPresenter.h.
MantidQt::MantidWidgets::AlgorithmProgressDialogPresenter::AlgorithmProgressDialogPresenter | ( | QWidget * | parent, |
IAlgorithmProgressDialogWidget * | view, | ||
AlgorithmProgressModel & | model | ||
) |
Definition at line 15 of file AlgorithmProgressDialogPresenter.cpp.
References algorithmStartedSlot(), Mantid::Kernel::SingletonHolder< T >::Instance(), m_progressBars, and MantidQt::MantidWidgets::AlgorithmProgressModel::setDialog().
|
overridevirtual |
This slot is triggered whenever an algorithms ends.
If the algorithm is not being tracked, there will not be an active progress bar for it, in which case no work is done
alg | The ID of the algorithm that is ending |
Implements MantidQt::MantidWidgets::AlgorithmProgressPresenterBase.
Definition at line 82 of file AlgorithmProgressDialogPresenter.cpp.
References m_progressBars.
|
overridevirtual |
This slot is triggered whenever an algorithm has started executing.
alg | The ID of the algorithm that has started executing |
Implements MantidQt::MantidWidgets::AlgorithmProgressPresenterBase.
Definition at line 35 of file AlgorithmProgressDialogPresenter.cpp.
References MantidQt::MantidWidgets::IAlgorithmProgressDialogWidget::addAlgorithm(), Mantid::Kernel::SingletonHolder< T >::Instance(), m_progressBars, and m_view.
Referenced by AlgorithmProgressDialogPresenter(), and updateProgressBarSlot().
size_t MantidQt::MantidWidgets::AlgorithmProgressDialogPresenter::getNumberTrackedAlgorithms | ( | ) |
Definition at line 94 of file AlgorithmProgressDialogPresenter.cpp.
References m_progressBars.
|
overridevirtual |
This slot is triggered whenever an algorithm reports progress.
If the algorithm is not being tracked (e.g. the Details window is opened AFTER the algorithm has started) then the started slot is triggered to add an active progress bar for it.
alg | 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 61 of file AlgorithmProgressDialogPresenter.cpp.
References algorithmStartedSlot(), m_progressBars, and MantidQt::MantidWidgets::AlgorithmProgressPresenterBase::setProgressBar().
|
private |
Reference to the model of the main window progress bar.
Definition at line 43 of file AlgorithmProgressDialogPresenter.h.
|
private |
Container for all the progress bars that are currently being displayed This container does NOT own any of the progress bars.
Definition at line 46 of file AlgorithmProgressDialogPresenter.h.
Referenced by algorithmEndedSlot(), AlgorithmProgressDialogPresenter(), algorithmStartedSlot(), getNumberTrackedAlgorithms(), and updateProgressBarSlot().
|
private |
Definition at line 41 of file AlgorithmProgressDialogPresenter.h.
Referenced by algorithmStartedSlot().