Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef _QmitkUpdateTimerWidget_H_INCLUDED
18 #define _QmitkUpdateTimerWidget_H_INCLUDED
19 
20 #include "ui_QmitkUpdateTimerWidgetControls.h"
21 #include "MitkIGTUIExports.h"
22 
23 
30 class MITKIGTUI_EXPORT QmitkUpdateTimerWidget : public QWidget
31 {
32  Q_OBJECT // this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
33 public:
34 
35 
37 
39  StopButton
40  };
41 
45  QmitkUpdateTimerWidget( QWidget* parent );
46 
50  virtual ~QmitkUpdateTimerWidget();
51 
55  unsigned int GetTimerInterval();
56 
60  void SetTimerInterval( unsigned int msec );
61 
65  void StartTimer();
66 
70  void StopTimer();
71 
75  QTimer* GetUpdateTimer();
76 
80  void SetPurposeLabelText( QString text );
81 
85  void HideFramerateSettings( bool hidden );
86 
87 
91  void SetIcon( WidgetButtons button, const QIcon& icon );
92 
93 
94 
95 
96 signals:
97  void Started();
98  void Stopped();
99 
100 public slots:
101  void EnableWidget();
102  void DisableWidget();
103 
104  protected slots:
105 
109  void OnStartTimer();
110 
114  void OnStopTimer();
115 
119  void OnChangeTimerInterval( int interval );
120 
121 protected:
122  void CreateConnections();
123  void CreateQtPartControl( QWidget *parent );
124  Ui::QmitkUpdateTimerWidgetControls* m_Controls;
125 
126 
127 private:
131  QTimer* m_UpdateTimer;
132 
136  void SetupUpdateRateSB( int min, int max, int step );
137 
141  void SetFrameRateLabel();
142 
143 };
144 #endif // _QmitkUpdateTimerWidget_H_INCLUDED
145 
QmitkUpdateTimerWidget.
Ui::QmitkUpdateTimerWidgetControls * m_Controls
gui widgets
static T max(T x, T y)
Definition: svm.cpp:70
static T min(T x, T y)
Definition: svm.cpp:67