Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxProcessReporter.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 #ifndef CXPROCESSREPORTER_H_
13 #define CXPROCESSREPORTER_H_
14 
15 #include "cxResourceExport.h"
16 
17 #include "boost/shared_ptr.hpp"
18 #include <QProcess>
19 #include <QString>
20 
21 namespace cx
22 {
23 
24 typedef boost::shared_ptr<class ProcessReporter> ProcessReporterPtr;
25 
33 class cxResource_EXPORT ProcessReporter : QObject
34 {
35  Q_OBJECT
36 
37 public:
38  ProcessReporter(QProcess* process, QString name);
39  ~ProcessReporter();
40 
41 private slots:
42  void processReadyRead();
43  void processStateChanged(QProcess::ProcessState newState);
44  void processError(QProcess::ProcessError error);
45  void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
46 
47 private:
48  QProcess* mProcess;
49 
50  QString mName;
51 };
52 ;
53 
54 } /* namespace cx */
55 #endif /* CXPROCESSREPORTER_H_ */
boost::shared_ptr< class ProcessReporter > ProcessReporterPtr
Namespace for all CustusX production code.