Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
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 
29 {
30  Q_OBJECT
31 
32 public:
33  //##Documentation
34  //##@brief Constructor;
35  //## holds param instance internally and connects this to the mitkProgressBar
36  QmitkProgressBar(QWidget *parent = nullptr, const char *name = nullptr);
37 
38  //##Documentation
39  //##@brief Destructor
40  ~QmitkProgressBar() override;
41 
42  //##Documentation
43  //## @brief Sets whether the current progress value is displayed.
44  void SetPercentageVisible(bool visible) override;
45 
46  //##Documentation
47  //## @brief Adds steps to totalSteps.
48  void AddStepsToDo(unsigned int steps) override;
49 
50  //##Documentation
51  //## @brief Sets the current amount of progress to current progress + steps.
52  //## @param steps the number of steps done since last Progress(int steps) call.
53  void Progress(unsigned int steps) override;
54 
55 signals:
56 
57  void SignalAddStepsToDo(unsigned int steps);
58  void SignalProgress(unsigned int steps);
59  void SignalSetPercentageVisible(bool visible);
60 
61 protected slots:
62 
63  virtual void SlotAddStepsToDo(unsigned int steps);
64  virtual void SlotProgress(unsigned int steps);
65  virtual void SlotSetPercentageVisible(bool visible);
66 
67 private:
68  //##Documentation
69  //## @brief Reset the progress bar. The progress bar "rewinds" and shows no progress.
70  void Reset() override;
71 
72  unsigned int m_TotalSteps;
73 
74  unsigned int m_Progress;
75 };
76 
77 #endif
MITKQTWIDGETS_EXPORT
#define MITKQTWIDGETS_EXPORT
Definition: MitkQtWidgetsExports.h:15
QmitkProgressBar
QT-Toolkit/GUI dependent class that provides the QT's ProgressBar.
Definition: QmitkProgressBar.h:28
mitk::ProgressBarImplementation::Reset
virtual void Reset()=0
Explicitly reset progress bar.
mitk::ProgressBarImplementation::AddStepsToDo
virtual void AddStepsToDo(unsigned int steps)=0
Adds steps to totalSteps.
mitk::ProgressBarImplementation::Progress
virtual void Progress(unsigned int steps)=0
Sets the current amount of progress to current progress + steps.
mitkProgressBarImplementation.h
mitk::ProgressBarImplementation::SetPercentageVisible
virtual void SetPercentageVisible(bool visible)=0
Sets whether the current progress value is displayed.
MitkQtWidgetsExports.h
mitk::ProgressBarImplementation
GUI independent Interface for all Gui dependent implementations of a ProgressBar.
Definition: mitkProgressBarImplementation.h:21