Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxDisplayTimerWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 
13 #ifndef CXDISPLAYTIMERWIDGET_H_
14 #define CXDISPLAYTIMERWIDGET_H_
15 
16 #include "cxResourceWidgetsExport.h"
17 
18 #include <QWidget>
19 #include <QDateTime>
20 class QTimer;
21 class QLabel;
22 class QDateTime;
23 
24 namespace cx
25 {
26 
33 class cxResourceWidgets_EXPORT DisplayTimerWidget : public QWidget
34 {
35  Q_OBJECT
36 public:
37  DisplayTimerWidget(QWidget* parent);
38 
39  void setFontSize(int fontSize);
40  void start();
41  void stop();
42  void failed();
43  int elaspedSeconds() const;
44 
45 private slots:
46  void timeoutSlot();
47 private:
48  void printText(QString color);
49  QTimer* mTimer;
50  QLabel* mLabel;
51  QDateTime mStartTime;
52  int mFontSize;
53 };
54 }
55 
56 #endif /* CXDISPLAYTIMERWIDGET_H_ */
A second counter widget.
Namespace for all CustusX production code.