Blender
V5.0
source
blender
freestyle
intern
system
ProgressBar.h
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
11
12
#include <string>
13
14
#include "
MEM_guardedalloc.h
"
15
16
using namespace
std;
17
18
namespace
Freestyle
{
19
20
class
ProgressBar
{
21
public
:
22
inline
ProgressBar
()
23
{
24
_numtotalsteps
= 0;
25
_progress
= 0;
26
}
27
28
virtual
~ProgressBar
() {}
29
30
virtual
void
reset
()
31
{
32
_numtotalsteps
= 0;
33
_progress
= 0;
34
}
35
36
virtual
void
setTotalSteps
(
uint
n)
37
{
38
_numtotalsteps
= n;
39
}
40
41
virtual
void
setProgress
(
uint
i
)
42
{
43
_progress
=
i
;
44
}
45
46
virtual
void
setLabelText
(
const
string
&s)
47
{
48
_label
= s;
49
}
50
52
inline
uint
getTotalSteps
()
const
53
{
54
return
_numtotalsteps
;
55
}
56
57
inline
uint
getProgress
()
const
58
{
59
return
_progress
;
60
}
61
62
inline
string
getLabelText
()
const
63
{
64
return
_label
;
65
}
66
67
protected
:
68
uint
_numtotalsteps
;
69
uint
_progress
;
70
string
_label
;
71
72
MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:ProgressBar"
)
73
};
74
75
}
/* namespace Freestyle */
uint
unsigned int uint
Definition
BLI_sys_types.h:64
MEM_guardedalloc.h
Read Guarded memory(de)allocation.
Freestyle::ProgressBar::setLabelText
virtual void setLabelText(const string &s)
Definition
ProgressBar.h:46
Freestyle::ProgressBar::getLabelText
string getLabelText() const
Definition
ProgressBar.h:62
Freestyle::ProgressBar::~ProgressBar
virtual ~ProgressBar()
Definition
ProgressBar.h:28
Freestyle::ProgressBar::getTotalSteps
uint getTotalSteps() const
Definition
ProgressBar.h:52
Freestyle::ProgressBar::reset
virtual void reset()
Definition
ProgressBar.h:30
Freestyle::ProgressBar::_numtotalsteps
uint _numtotalsteps
Definition
ProgressBar.h:68
Freestyle::ProgressBar::_progress
uint _progress
Definition
ProgressBar.h:69
Freestyle::ProgressBar::ProgressBar
ProgressBar()
Definition
ProgressBar.h:22
Freestyle::ProgressBar::_label
string _label
Definition
ProgressBar.h:70
Freestyle::ProgressBar::setTotalSteps
virtual void setTotalSteps(uint n)
Definition
ProgressBar.h:36
Freestyle::ProgressBar::setProgress
virtual void setProgress(uint i)
Definition
ProgressBar.h:41
Freestyle::ProgressBar::getProgress
uint getProgress() const
Definition
ProgressBar.h:57
Freestyle
inherits from class Rep
Definition
AppCanvas.cpp:20
i
i
Definition
text_draw.cc:230
Generated on
for Blender by
doxygen
1.16.1