Refactored CameraTcpClient to CameraTcpServer (to send images we connect to find_object, instead of connecting find_object to an image server), removed parameter CameraIP (missing files) git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@365 620bd6b2-0a58-f614-fd9a-1bd335dccda9
39 lines
799 B
C++
39 lines
799 B
C++
/*
|
|
* TCPResponse.h
|
|
*
|
|
* Created on: 2014-05-05
|
|
* Author: mathieu
|
|
*/
|
|
|
|
#ifndef TCPRESPONSE_H_
|
|
#define TCPRESPONSE_H_
|
|
|
|
#include <QtNetwork/QTcpSocket>
|
|
#include <QtCore/QMultiMap>
|
|
#include <QtGui/QTransform>
|
|
#include <QtCore/QRect>
|
|
|
|
class TcpResponse : public QTcpSocket
|
|
{
|
|
Q_OBJECT;
|
|
public:
|
|
TcpResponse(QObject * parent = 0);
|
|
const QMultiMap<int, QPair<QRect, QTransform> > & objectsDetected() const {return objectsDetected_;}
|
|
bool dataReceived() const {return dataReceived_;}
|
|
|
|
private Q_SLOTS:
|
|
void readReceivedData();
|
|
void displayError(QAbstractSocket::SocketError socketError);
|
|
void connectionLost();
|
|
|
|
Q_SIGNALS:
|
|
void detectionReceived();
|
|
|
|
private:
|
|
quint16 blockSize_;
|
|
QMultiMap<int, QPair<QRect, QTransform> > objectsDetected_;
|
|
bool dataReceived_;
|
|
};
|
|
|
|
#endif /* TCPCLIENT_H_ */
|