CustusX  18.04
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  int elaspedSeconds() const;
43 
44 private slots:
45  void timeoutSlot();
46 private:
47  void printText(QString color);
48  QTimer* mTimer;
49  QLabel* mLabel;
50  QDateTime mStartTime;
51  int mFontSize;
52 };
53 }
54 
55 #endif /* CXDISPLAYTIMERWIDGET_H_ */
A second counter widget.
Namespace for all CustusX production code.