Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ProgressPresenter Class Reference

#include <ProgressPresenter.h>

Inheritance diagram for ProgressPresenter:
Mantid::Kernel::ProgressBase

Public Member Functions

void clear ()
 
void doReport (const std::string &) override
 Pure virtual method that does the progress reporting, to be overridden. More...
 
 ProgressPresenter (double start, double end, int64_t nSteps, MantidQt::MantidWidgets::ProgressableView *const progressableView)
 
void setAsEndlessIndicator ()
 
void setAsPercentageIndicator ()
 
virtual ~ProgressPresenter ()=default
 
- Public Member Functions inherited from Mantid::Kernel::ProgressBase
virtual void doReport (const std::string &msg="")=0
 Pure virtual method that does the progress reporting, to be overridden. More...
 
double getEstimatedTime () const
 Returns the estimated number of seconds until the algorithm completes. More...
 
virtual bool hasCancellationBeenRequested () const
 Override so that the reporter can inform whether a cancellation request has been used. More...
 
ProgressBaseoperator= (const ProgressBase &rhs)
 
 ProgressBase ()
 Default constructor. More...
 
 ProgressBase (const ProgressBase &source)
 Copy constructor that builds a new ProgressBase object. More...
 
 ProgressBase (double start, double end, int64_t numSteps)
 Creates a ProgressBase instance. More...
 
void report ()
 Increments the loop counter by 1, then sends the progress notification on behalf of its algorithm. More...
 
void report (const std::string &msg)
 Increments the loop counter by 1, then sends the progress notification on behalf of its algorithm. More...
 
void report (int64_t i, const std::string &msg="")
 Sends the progress notification on behalf of its algorithm. More...
 
void reportIncrement (int inc, const std::string &msg="")
 Sends the progress notification and increment the loop counter by more than one. More...
 
void reportIncrement (size_t inc, const std::string &msg="")
 Sends the progress notification and increment the loop counter by more than one. More...
 
void resetNumSteps (int64_t nsteps, double start, double end)
 Change the number of steps between start/end. More...
 
void setNotifyStep (double notifyStepPct)
 Override the frequency at which notifications are sent out. More...
 
void setNumSteps (int64_t nsteps)
 Change the number of steps between start/end. More...
 
virtual ~ProgressBase ()
 Destructor. More...
 

Private Attributes

MantidQt::MantidWidgets::ProgressableView *const m_progressableView
 

Additional Inherited Members

- Protected Attributes inherited from Mantid::Kernel::ProgressBase
double m_end
 Ending progress. More...
 
std::atomic< int64_t > m_i
 Loop counter. More...
 
int64_t m_ifirst
 Loop counter initial value. More...
 
std::atomic< int64_t > m_last_reported
 Last loop counter value the was a peport. More...
 
int64_t m_notifyStep
 Frequency of sending the notification (every m_step times) More...
 
double m_notifyStepPct
 Frequency of sending the notification (as a min percentage step, e.g. More...
 
int m_notifyStepPrecision
 Digits of precision in the reporting. More...
 
int64_t m_numSteps
 Loop counter upper bound. More...
 
double m_start
 Starting progress. More...
 
double m_step
 Progress increment at each loop. More...
 
std::unique_ptr< Kernel::Timerm_timeElapsed
 Timer that is started when the progress bar is constructed. More...
 

Detailed Description

Definition at line 12 of file ProgressPresenter.h.

Constructor & Destructor Documentation

◆ ProgressPresenter()

ProgressPresenter::ProgressPresenter ( double  start,
double  end,
int64_t  nSteps,
MantidQt::MantidWidgets::ProgressableView *const  progressableView 
)
inline

◆ ~ProgressPresenter()

virtual ProgressPresenter::~ProgressPresenter ( )
virtualdefault

Member Function Documentation

◆ clear()

void ProgressPresenter::clear ( )
inline

◆ doReport()

void ProgressPresenter::doReport ( const std::string &  msg)
inlineoverridevirtual

◆ setAsEndlessIndicator()

void ProgressPresenter::setAsEndlessIndicator ( )
inline

◆ setAsPercentageIndicator()

void ProgressPresenter::setAsPercentageIndicator ( )
inline

Member Data Documentation

◆ m_progressableView

MantidQt::MantidWidgets::ProgressableView* const ProgressPresenter::m_progressableView
private

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