CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxtestDirectSignalListener.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 #ifndef CXTESTDIRECTSIGNALLISTENER_H
12 #define CXTESTDIRECTSIGNALLISTENER_H
13 
14 #include "cxtestutilities_export.h"
15 #include <QObject>
16 
17 namespace cxtest
18 {
19 
27 class CXTESTUTILITIES_EXPORT DirectSignalListener : public QObject
28 {
29  Q_OBJECT
30 public:
31  DirectSignalListener(QObject* object, const char* signal);
33 
34  bool isReceived() const;
35  unsigned int getNumberOfRecievedSignals() const;
36 
37 private slots:
38  void receive();
39 
40 private:
41  unsigned int mNumberOfSignalsReceived;
42 };
43 
44 } /* namespace cxtest */
45 
46 #endif // CXTESTDIRECTSIGNALLISTENER_H
Listen for signals using Qt::DirectConnection.