WIP: main
This commit is contained in:
parent
f25f34565a
commit
15730b470e
52 changed files with 2438 additions and 208 deletions
34
client/localclient.h
Normal file
34
client/localclient.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
#ifndef LOCALCLIENT_H
|
||||
#define LOCALCLIENT_H
|
||||
|
||||
#include <QDataStream>
|
||||
#include <QLocalSocket>
|
||||
|
||||
class LocalClient : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit LocalClient(QObject *parent = nullptr);
|
||||
|
||||
QString serverName() const;
|
||||
bool connectedState() const;
|
||||
quint64 write(const QByteArray& data);
|
||||
void connectToServer(const QString& name);
|
||||
|
||||
signals:
|
||||
void connected();
|
||||
void lineAvailable(const QString& line);
|
||||
|
||||
private slots:
|
||||
void displayError(QLocalSocket::LocalSocketError socketError);
|
||||
void onConnected();
|
||||
void onReadyRead();
|
||||
|
||||
private:
|
||||
QLocalSocket* m_socket;
|
||||
QDataStream m_in;
|
||||
quint32 m_blockSize;
|
||||
};
|
||||
|
||||
#endif // LOCALCLIENT_H
|
Loading…
Add table
Add a link
Reference in a new issue