summaryrefslogtreecommitdiff
path: root/qt/RGBController/irc.h
diff options
context:
space:
mode:
authordaniel-Jones <daniel@danieljon.es>2017-05-17 01:13:47 +0930
committerdaniel-Jones <daniel@danieljon.es>2017-05-17 01:13:47 +0930
commit2ce2f6376152402c3fc0d750720770b963a7d3cf (patch)
treea6824736703ce0ceab02ba1e823e4a888700a0df /qt/RGBController/irc.h
parent9ff573e9fe4c40ffb342ce2b215042c39b518aeb (diff)
downloadRGB-Controller-2ce2f6376152402c3fc0d750720770b963a7d3cf.tar.gz
RGB-Controller-2ce2f6376152402c3fc0d750720770b963a7d3cf.zip
Major update, UI redesigned to fit a smaller footprint using tabs and an irc bot has been introduced in the IRC tab to allow control of my leds from literally anywhere.
Diffstat (limited to 'qt/RGBController/irc.h')
-rw-r--r--qt/RGBController/irc.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/qt/RGBController/irc.h b/qt/RGBController/irc.h
new file mode 100644
index 0000000..b9bdefc
--- /dev/null
+++ b/qt/RGBController/irc.h
@@ -0,0 +1,33 @@
+#ifndef IRC_H
+#define IRC_H
+
+#include <QtNetwork/QTcpSocket>
+#include <QDebug>
+
+class irc : public QObject
+{
+ Q_OBJECT
+ public:
+ explicit irc(QObject *parent = 0);
+ void setup(QString srv, int p, QString c, QString n);
+ void discon();
+ void sendmsg(QString msg);
+ private:
+ QTcpSocket *socket;
+ QString server;
+ int port;
+ QString channel;
+ QString name;
+ QString buf;
+ private slots:
+ void read();
+ void con();
+ void handle(QString str);
+
+ signals:
+ void sendcmd(QString cmd);
+
+ public slots:
+};
+
+#endif // IRC_H