Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
QmitkUpdateTimerWidget.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 QmitkUpdateTimerWidget_h
14 #define QmitkUpdateTimerWidget_h
15 
16 #include "ui_QmitkUpdateTimerWidgetControls.h"
17 #include "MitkIGTUIExports.h"
18 
19 
26 class MITKIGTUI_EXPORT QmitkUpdateTimerWidget : public QWidget
27 {
28  Q_OBJECT // this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
29 public:
30 
31 
33 
35  StopButton
36  };
37 
41  QmitkUpdateTimerWidget( QWidget* parent );
42 
46  ~QmitkUpdateTimerWidget() override;
47 
51  unsigned int GetTimerInterval();
52 
56  void SetTimerInterval( unsigned int msec );
57 
61  void StartTimer();
62 
66  void StopTimer();
67 
71  QTimer* GetUpdateTimer();
72 
76  void SetPurposeLabelText( QString text );
77 
81  void HideFramerateSettings( bool hidden );
82 
83 
87  void SetIcon( WidgetButtons button, const QIcon& icon );
88 
89 
90 
91 
92 signals:
93  void Started();
94  void Stopped();
95 
96 public slots:
97  void EnableWidget();
98  void DisableWidget();
99 
100  protected slots:
101 
105  void OnStartTimer();
106 
110  void OnStopTimer();
111 
115  void OnChangeTimerInterval( int interval );
116 
117 protected:
118  void CreateConnections();
119  void CreateQtPartControl( QWidget *parent );
120  Ui::QmitkUpdateTimerWidgetControls* m_Controls;
121 
122 
123 private:
127  QTimer* m_UpdateTimer;
128 
132  void SetupUpdateRateSB( int min, int max, int step );
133 
137  void SetFrameRateLabel();
138 
139 };
140 #endif
QmitkUpdateTimerWidget::WidgetButtons
WidgetButtons
Definition: QmitkUpdateTimerWidget.h:32
QmitkUpdateTimerWidget
QmitkUpdateTimerWidget.
Definition: QmitkUpdateTimerWidget.h:26
QmitkUpdateTimerWidget::m_Controls
Ui::QmitkUpdateTimerWidgetControls * m_Controls
gui widgets
Definition: QmitkUpdateTimerWidget.h:120
QmitkUpdateTimerWidget::StartButton
@ StartButton
Definition: QmitkUpdateTimerWidget.h:34