Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxImageServer.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 CXIMAGESERVER_H_
13 #define CXIMAGESERVER_H_
14 
15 #include "cxGrabberExport.h"
16 
17 #include <QTcpServer>
18 #include <QTimer>
19 #include <QPointer>
20 #include "boost/shared_ptr.hpp"
21 
22 namespace cx
23 {
24 typedef boost::shared_ptr<class Streamer> StreamerPtr;
25 
34 class cxGrabber_EXPORT ImageServer: public QTcpServer
35 {
36  Q_OBJECT
37 
38 public:
39  ImageServer(QObject* parent = NULL);
40  virtual ~ImageServer();
41  bool startListen(int port);
42  static void printHelpText();
43  static QString getArgumentHelpText(QString applicationName);
44  bool initialize();
45 protected:
46  void incomingConnection(qintptr socketDescriptor);
47 private slots:
48  void socketDisconnectedSlot();
49 private:
50  StreamerPtr mImageSender;
51  QPointer<QTcpSocket> mSocket;
52 };
53 
54 } // namespace cx
55 
56 #endif /* CXIMAGESERVER_H_ */
ImageServer.
Definition: cxImageServer.h:34
boost::shared_ptr< class Streamer > StreamerPtr
Namespace for all CustusX production code.