2014-08-02 06:10:48 +00:00
|
|
|
/*
|
|
|
|
|
* TCPResponse.h
|
|
|
|
|
*
|
|
|
|
|
* Created on: 2014-05-05
|
|
|
|
|
* Author: mathieu
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef TCPRESPONSE_H_
|
|
|
|
|
#define TCPRESPONSE_H_
|
|
|
|
|
|
2014-08-04 01:33:52 +00:00
|
|
|
#include "find_object/DetectionInfo.h"
|
|
|
|
|
|
2014-08-02 06:10:48 +00:00
|
|
|
#include <QtNetwork/QTcpSocket>
|
|
|
|
|
#include <QtCore/QMultiMap>
|
|
|
|
|
#include <QtGui/QTransform>
|
|
|
|
|
#include <QtCore/QRect>
|
|
|
|
|
|
|
|
|
|
class TcpResponse : public QTcpSocket
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT;
|
|
|
|
|
public:
|
|
|
|
|
TcpResponse(QObject * parent = 0);
|
2014-08-04 01:33:52 +00:00
|
|
|
const DetectionInfo & info() const {return info_;}
|
2014-08-02 06:10:48 +00:00
|
|
|
bool dataReceived() const {return dataReceived_;}
|
|
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
|
void readReceivedData();
|
|
|
|
|
void displayError(QAbstractSocket::SocketError socketError);
|
|
|
|
|
void connectionLost();
|
|
|
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
|
void detectionReceived();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
quint16 blockSize_;
|
2014-08-04 01:33:52 +00:00
|
|
|
DetectionInfo info_;
|
2014-08-02 06:10:48 +00:00
|
|
|
bool dataReceived_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif /* TCPCLIENT_H_ */
|