Mantid
Loading...
Searching...
No Matches
ProgressableView.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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 +
8
10
12
13void ProgressableView::setProgressRange(int min, int max) {
14 // Cache values for a percentage-style progress bar i.e. where both are not
15 // zero
16 if (min != 0 || max != 0) {
17 m_min = min;
18 m_max = max;
19 }
20}
21
25}
26
29 // To get QProgressBar to display as an endless progress indicator, we need
30 // to set start=end=0 in the derived view class
32 setProgressRange(0, 0);
33}
34} // namespace MantidQt::MantidWidgets
virtual void setProgressRange(int min, int max)