Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkProgressBar.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkProgressBar_h
14 #define mitkProgressBar_h
15 #include <MitkCoreExports.h>
16 #include <itkObject.h>
17 
18 namespace mitk
19 {
20  class ProgressBarImplementation;
21 
31  class MITKCORE_EXPORT ProgressBar : public itk::Object
32  {
33  public:
34  itkTypeMacro(ProgressBar, itk::Object);
35 
43 
52 
58 
63  void AddStepsToDo(unsigned int steps);
64 
66  void Reset();
67 
72  void Progress(unsigned int steps = 1);
73 
78  void SetPercentageVisible(bool visible);
79 
80  protected:
81  typedef std::vector<ProgressBarImplementation *> ProgressBarImplementationsList;
82  typedef ProgressBarImplementationsList::iterator ProgressBarImplementationsListIterator;
83 
85 
86  ~ProgressBar() override;
87 
89 
91  };
92 
93 } // end namespace mitk
94 
95 #endif
#define MITKCORE_EXPORT
GUI-independent interface for all GUI-dependent implementations of a progress bar.
Sending a message to the application's ProgressBar.
static ProgressBar * m_Instance
~ProgressBar() override
static ProgressBar * GetInstance()
Static method to get the singleton ProgressBar instance.
void UnregisterImplementationInstance(ProgressBarImplementation *implementation)
Unregister a previously registered ProgressBar implementation.
void Reset()
Explicitly reset the progress bar.
void SetPercentageVisible(bool visible)
Sets whether the current progress value is displayed as a percentage.
void RegisterImplementationInstance(ProgressBarImplementation *implementation)
Register a GUI-dependent ProgressBar implementation.
void AddStepsToDo(unsigned int steps)
Adds steps to the total number of steps to do.
std::vector< ProgressBarImplementation * > ProgressBarImplementationsList
ProgressBarImplementationsList m_Implementations
void Progress(unsigned int steps=1)
Sets the current amount of progress to current progress + steps.
ProgressBarImplementationsList::iterator ProgressBarImplementationsListIterator
Find image slices visible on a given plane.