Blender V4.3
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
12#include <string>
13
14#ifdef WITH_CXX_GUARDEDALLOC
15# include "MEM_guardedalloc.h"
16#endif
17
18using namespace std;
19
20namespace Freestyle {
21
23 public:
24 inline ProgressBar()
25 {
27 _progress = 0;
28 }
29
30 virtual ~ProgressBar() {}
31
32 virtual void reset()
33 {
35 _progress = 0;
36 }
37
38 virtual void setTotalSteps(uint n)
39 {
41 }
42
43 virtual void setProgress(uint i)
44 {
45 _progress = i;
46 }
47
48 virtual void setLabelText(const string &s)
49 {
50 _label = s;
51 }
52
54 inline uint getTotalSteps() const
55 {
56 return _numtotalsteps;
57 }
58
59 inline uint getProgress() const
60 {
61 return _progress;
62 }
63
64 inline string getLabelText() const
65 {
66 return _label;
67 }
68
69 protected:
72 string _label;
73
74#ifdef WITH_CXX_GUARDEDALLOC
75 MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ProgressBar")
76#endif
77};
78
79} /* namespace Freestyle */
unsigned int uint
Read Guarded memory(de)allocation.
virtual void setLabelText(const string &s)
Definition ProgressBar.h:48
string getLabelText() const
Definition ProgressBar.h:64
uint getTotalSteps() const
Definition ProgressBar.h:54
virtual void reset()
Definition ProgressBar.h:32
virtual void setTotalSteps(uint n)
Definition ProgressBar.h:38
virtual void setProgress(uint i)
Definition ProgressBar.h:43
uint getProgress() const
Definition ProgressBar.h:59
inherits from class Rep
Definition AppCanvas.cpp:20