Explorar el Código

getState

master
Robin Thoni hace 10 años
padre
commit
31f4b08ac6
Se han modificado 2 ficheros con 6 adiciones y 2 borrados
  1. 5
    0
      ptsocket/ptsocket.cpp
  2. 1
    2
      ptsocket/ptsocket.h

+ 5
- 0
ptsocket/ptsocket.cpp Ver fichero

22
     connect(this, SIGNAL(readyRead()), this, SLOT(m_readyRead()));
22
     connect(this, SIGNAL(readyRead()), this, SLOT(m_readyRead()));
23
 }
23
 }
24
 
24
 
25
+PTSocket::State PTSocket::getState() const
26
+{
27
+	return m_state;
28
+}
29
+
25
 int PTSocket::getTimeout() const
30
 int PTSocket::getTimeout() const
26
 {
31
 {
27
     return m_timeout;
32
     return m_timeout;

+ 1
- 2
ptsocket/ptsocket.h Ver fichero

8
 #include <QTimer>
8
 #include <QTimer>
9
 #include <QMetaEnum>
9
 #include <QMetaEnum>
10
 
10
 
11
-//#define PT_DEBUG
12
-
13
 class LIBPTSOCKETSHARED_EXPORT PTSocket : public QTcpSocket
11
 class LIBPTSOCKETSHARED_EXPORT PTSocket : public QTcpSocket
14
 {
12
 {
15
 	Q_OBJECT
13
 	Q_OBJECT
26
     };
24
     };
27
     Q_ENUMS(State)
25
     Q_ENUMS(State)
28
 	PTSocket(QObject* p);
26
 	PTSocket(QObject* p);
27
+	State getState() const;
29
 	int getTimeout() const;
28
 	int getTimeout() const;
30
     int getPingInterval() const;
29
     int getPingInterval() const;
31
     bool isServerSide() const;
30
     bool isServerSide() const;

Loading…
Cancelar
Guardar