This repository has been archived on 2026-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Simon Stuerz 59c1157e57 client added, connection over tcp works
to do now: communication protocoll for json
2013-08-22 11:43:38 +02:00

35 lines
679 B
C++

#ifndef CLIENT_H
#define CLIENT_H
#include <QObject>
#include <QTcpSocket>
#include <QHostAddress>
class Client : public QObject
{
Q_OBJECT
//Q_PROPERTY(QString ipAddress READ ipAddress WRITE setIpAddress NOTIFY ipAddressChanged)
public:
explicit Client(QObject *parent = 0);
private:
QTcpSocket *m_tcpSocket;
QString m_tcpBuffer;
signals:
private slots:
void connectionError(QAbstractSocket::SocketError error);
void readData();
void connectedToHost();
public slots:
void connectToHost(QString ipAddress, QString port);
void disconnectFromHost();
void sendData(QString target, QString command);
};
#endif // CLIENT_H