OpendTect-6_4  6.4
qtcpservercomm.h
Go to the documentation of this file.
1 #ifndef qtcpservercomm_h
2 #define qtcpservercomm_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: March 2009
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include <QTcpServer>
16 #include "netserver.h"
17 
18 /*\brief QTcpServer communication class
19 
20  Internal object, to hide Qt's signal/slot mechanism.
21 */
22 
23 QT_BEGIN_NAMESPACE
24 
25 class QTcpServerComm : public QObject
26 {
27  Q_OBJECT
28  friend class Network::Server;
29 
30 protected:
31 
32 QTcpServerComm( QTcpServer* qtcpserver, Network::Server* netserver )
33  : qtcpserver_(qtcpserver)
34  , netserver_(netserver)
35 {
36  if ( !qtcpserver || !netserver )
37  return;
38  connect( qtcpserver, SIGNAL(newConnection()), this, SLOT(notifNewConn()) );
39 }
40 
41 private slots:
42 
44 {
45  netserver_->notifyNewConnection();
46 }
47 
48 private:
49 
50  QTcpServer* qtcpserver_;
52 
53 };
54 
55 QT_END_NAMESPACE
56 
57 #endif
Definition: qtcpservercomm.h:25
QTcpServerComm(QTcpServer *qtcpserver, Network::Server *netserver)
Definition: qtcpservercomm.h:32
friend class Network::Server
Definition: qtcpservercomm.h:28
Network::Server * netserver_
Definition: qtcpservercomm.h:51
QTcpServer * qtcpserver_
Definition: qtcpservercomm.h:50
void notifNewConn()
Definition: qtcpservercomm.h:43

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019