38 lines
563 B
C++
38 lines
563 B
C++
#ifndef SOCKETIRC_H
|
|
#define SOCKETIRC_H
|
|
|
|
#include <QTcpSocket>
|
|
#include <QPushButton>
|
|
#include <QThread>
|
|
|
|
class SocketIRC : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
SocketIRC();
|
|
void setServer(std::string server_);
|
|
void setPort(int port_);
|
|
|
|
private:
|
|
|
|
std::string server;
|
|
int port;
|
|
QTcpSocket sock;
|
|
bool isConnected;
|
|
|
|
private slots:
|
|
void readMsg();
|
|
|
|
public slots:
|
|
void sendMsg(QString msg);
|
|
void setConnected(int c);
|
|
|
|
signals:
|
|
void receivedMsg(QString msg);
|
|
void stateChanged(int newState);
|
|
};
|
|
|
|
#endif // SOCKETIRC_H
|