Loading [MathJax]/extensions/tex2jax.js
Mantid
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
w
x
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Properties
a
b
e
f
i
l
m
o
s
t
u
w
Related Functions
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Variables
_
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
e
f
k
l
o
p
r
s
t
v
w
Macros
a
b
c
d
e
f
g
i
k
l
m
n
p
q
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
Loading...
Searching...
No Matches
qt
widgets
common
src
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 +
7
#include "
MantidQtWidgets/Common/ProgressableView.h
"
8
9
namespace
MantidQt::MantidWidgets
{
10
11
bool
ProgressableView::isPercentageIndicator
()
const
{
return
m_style
==
Style::PERCENTAGE
; }
12
13
void
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
22
void
ProgressableView::setAsPercentageIndicator
() {
23
m_style
=
Style::PERCENTAGE
;
24
setProgressRange
(
m_min
,
m_max
);
25
}
26
27
void
ProgressableView::setAsEndlessIndicator
() {
28
m_style
=
Style::ENDLESS
;
29
// To get QProgressBar to display as an endless progress indicator, we need
30
// to set start=end=0 in the derived view class
31
if
(
m_style
==
Style::ENDLESS
)
32
setProgressRange
(0, 0);
33
}
34
}
// namespace MantidQt::MantidWidgets
ProgressableView.h
MantidQt::MantidWidgets::ProgressableView::setProgressRange
virtual void setProgressRange(int min, int max)
Definition:
ProgressableView.cpp:13
MantidQt::MantidWidgets::ProgressableView::m_style
Style m_style
Definition:
ProgressableView.h:34
MantidQt::MantidWidgets::ProgressableView::m_min
int m_min
Definition:
ProgressableView.h:35
MantidQt::MantidWidgets::ProgressableView::setAsEndlessIndicator
void setAsEndlessIndicator()
Definition:
ProgressableView.cpp:27
MantidQt::MantidWidgets::ProgressableView::isPercentageIndicator
bool isPercentageIndicator() const
Definition:
ProgressableView.cpp:11
MantidQt::MantidWidgets::ProgressableView::Style::ENDLESS
@ ENDLESS
MantidQt::MantidWidgets::ProgressableView::Style::PERCENTAGE
@ PERCENTAGE
MantidQt::MantidWidgets::ProgressableView::m_max
int m_max
Definition:
ProgressableView.h:36
MantidQt::MantidWidgets::ProgressableView::setAsPercentageIndicator
void setAsPercentageIndicator()
Definition:
ProgressableView.cpp:22
MantidQt::MantidWidgets
Definition:
AddWorkspaceDialog.h:21
Generated on Tue Jan 3 2023 11:58:02 for Mantid by
1.9.5