-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathls_pagetcpsrvitem.h
39 lines (30 loc) · 1008 Bytes
/
ls_pagetcpsrvitem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef LS_PAGETCPSRVITEM_H
#define LS_PAGETCPSRVITEM_H
#include <QtNetwork>
#include <QListWidgetItem>
#include "myconfig.h"
class LS_PageTcpSrvItem;
class LS_PageTcpSrvItem : public QObject, public QListWidgetItem
{
Q_OBJECT
LoProperty0(QTcpSocket*, Tcp)
LoProperty1(QHostAddress, LocalIP)
LoProperty1(QHostAddress, RemoteIP)
LoProperty0(quint16, LocalPort)
LoProperty0(quint16, RemotePort)
LoProperty1(QString, LocalAddress)
LoProperty1(QString, RemoteAddress)
public:
LS_PageTcpSrvItem(QTcpSocket *tcp, QListWidget *view = Q_NULLPTR);
~LS_PageTcpSrvItem();
void sendData(const QByteArray &a);
signals:
void sigReadyRead(LS_PageTcpSrvItem* item);
void sigDisconnected(LS_PageTcpSrvItem* item);
void sigError(LS_PageTcpSrvItem* item, QAbstractSocket::SocketError err);
private slots:
void onReadyRead();
void onDisconnected();
void onError(QAbstractSocket::SocketError err);
};
#endif // LS_PAGETCPSRVITEM_H