KDEAmbi/wledclient.h

30 lines
544 B
C++

#ifndef WLEDCLIENT_H
#define WLEDCLIENT_H
#include <QObject>
#include <QUdpSocket>
#include <QHostAddress>
#include <QImage>
class WledClient : public QObject
{
Q_OBJECT
public:
explicit WledClient(QString host, ushort port, QObject *parent = nullptr);
~WledClient();
void sendImage(const QImage &image);
void flashLeds(int startIndex, int count, QColor color);
private:
QUdpSocket *_udpSocket;
QHostAddress _wledHost;
ushort _wledPort;
signals:
void error(QString message);
};
#endif // WLEDCLIENT_H