55 lines
1.2 KiB
C++
55 lines
1.2 KiB
C++
#ifndef HYPERIONCLIENT_H
|
|
#define HYPERIONCLIENT_H
|
|
|
|
#include <QTcpSocket>
|
|
#include <QFile>
|
|
#include <QIODevice>
|
|
|
|
class HyperionClient : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
enum {
|
|
REDADJUST = 0x01,
|
|
BLUEADJUST = 0x02,
|
|
GREENADJUST = 0x04,
|
|
};
|
|
QByteArray imgCmdBuf;
|
|
|
|
HyperionClient(QString, ushort, QString);
|
|
~HyperionClient();
|
|
|
|
void clearLeds();
|
|
void setLedColor(quint8, quint8, quint8);
|
|
void ledAdjustments(QString, QString, QString, QString, QString, QString);
|
|
|
|
private:
|
|
QTcpSocket *_sock_p;
|
|
QByteArray _cmd_m;
|
|
QString _host_m;
|
|
quint16 _port_m;
|
|
QString _priority_m;
|
|
QString _redAdjust_m = "";
|
|
QString _greenAdjust_m = "";
|
|
QString _blueAdjust_m = "";
|
|
QString _temperature_m = "";
|
|
QString _threshold_m = "";
|
|
QString _transform_m = "";
|
|
int _colorAdjustmentType_m = 0;
|
|
|
|
void _sendCommand();
|
|
void _connectHost();
|
|
bool _isConnected();
|
|
void _ledAdjustments();
|
|
void _colorAdjustment();
|
|
void _thresholdAdjustment();
|
|
void _transformdAdjustment();
|
|
void _temperatureAdjustment();
|
|
|
|
public slots:
|
|
void sendImage(const uchar *data, int size);
|
|
void setImgSize(int width, int height);
|
|
};
|
|
|
|
#endif // HYPERIONCLIENT_H
|