30 #include <opencv2/opencv.hpp> 31 #include <QtGui/QTransform> 32 #include <QtCore/QPointF> 33 #include <QtCore/QTime> 41 connect(
this, SIGNAL(error(QAbstractSocket::SocketError)),
this, SLOT(
displayError(QAbstractSocket::SocketError)));
42 connect(
this, SIGNAL(disconnected()),
this, SLOT(
connectionLost()));
48 in.setVersion(QDataStream::Qt_4_0);
52 if (this->bytesAvailable() < (
int)
sizeof(quint16))
77 case QAbstractSocket::RemoteHostClosedError:
79 case QAbstractSocket::HostNotFoundError:
80 printf(
"Tcp error: The host was not found. Please " 81 "check the host name and port settings.\n");
83 case QAbstractSocket::ConnectionRefusedError:
84 printf(
"The connection was refused by the peer. " 85 "Make sure Find-Object is running, " 86 "and check that the host name and port " 87 "settings are correct.\n");
90 printf(
"The following error occurred: %s.\n", this->errorString().toStdString().c_str());
97 printf(
"Connection lost!\n");
TcpResponse(QObject *parent=0)
find_object::DetectionInfo info_
void displayError(QAbstractSocket::SocketError socketError)
static bool in(Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4)