Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkProgressBar.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 QmitkProgressBar_h
14 #define QmitkProgressBar_h
15 
16 #include <MitkQtWidgetsExports.h>
17 
18 #include <QProgressBar>
20 
37 {
38  Q_OBJECT
39 
40 public:
46  QmitkProgressBar(QWidget *parent = nullptr, const char *name = nullptr);
47 
48  ~QmitkProgressBar() override;
49 
54  void SetPercentageVisible(bool visible) override;
55 
60  void AddStepsToDo(unsigned int steps) override;
61 
69  void Progress(unsigned int steps) override;
70 
71 signals:
72 
74  void SignalAddStepsToDo(unsigned int steps);
76  void SignalProgress(unsigned int steps);
78  void SignalSetPercentageVisible(bool visible);
79 
80 protected slots:
81 
82  virtual void SlotAddStepsToDo(unsigned int steps);
83  virtual void SlotProgress(unsigned int steps);
84  virtual void SlotSetPercentageVisible(bool visible);
85 
86 private:
88  void Reset() override;
89 
90  unsigned int m_TotalSteps;
91 
92  unsigned int m_Progress;
93 };
94 
95 #endif
#define MITKQTWIDGETS_EXPORT
Qt implementation of the MITK progress bar interface.
void SignalSetPercentageVisible(bool visible)
Internal signal to dispatch SetPercentageVisible to the GUI thread.
virtual void SlotAddStepsToDo(unsigned int steps)
~QmitkProgressBar() override
virtual void SlotProgress(unsigned int steps)
void AddStepsToDo(unsigned int steps) override
Adds the given number of steps to the total step count.
void SignalProgress(unsigned int steps)
Internal signal to dispatch Progress to the GUI thread.
QmitkProgressBar(QWidget *parent=nullptr, const char *name=nullptr)
Constructs the progress bar and registers it with mitk::ProgressBar.
void SignalAddStepsToDo(unsigned int steps)
Internal signal to dispatch AddStepsToDo to the GUI thread.
void SetPercentageVisible(bool visible) override
Sets whether the percentage text is displayed on the progress bar.
void Progress(unsigned int steps) override
Advances the progress by the given number of steps.
virtual void SlotSetPercentageVisible(bool visible)
GUI-independent interface for all GUI-dependent implementations of a progress bar.
virtual void Reset()=0
Explicitly resets the progress bar to zero.