Mantid
Loading...
Searching...
No Matches
ProgressableView.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
10
11namespace MantidQt {
12namespace MantidWidgets {
13
17public:
20 enum class Style { PERCENTAGE, ENDLESS };
21
22 ProgressableView() : m_style{Style::PERCENTAGE}, m_min(0), m_max(100) {}
23 virtual ~ProgressableView() = default;
24
25 virtual void setProgress(int progress) = 0;
26 virtual void clearProgress() = 0;
27 virtual void setProgressRange(int min, int max);
28
29 bool isPercentageIndicator() const;
30 void setAsPercentageIndicator();
31 void setAsEndlessIndicator();
32
33protected:
35 int m_min;
36 int m_max;
37};
38
39} // namespace MantidWidgets
40} // namespace MantidQt
#define EXPORT_OPT_MANTIDQT_COMMON
Definition: DllOption.h:15
specnum_t m_min
specnum_t m_max
ProgressableView : Abstract view useful for indicating progress.
virtual void setProgress(int progress)=0
Style
The style of the progress bar: either a standard percentage progress bar or an endless busy indicator...
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...