diff options
author | daniel-Jones <daniel@danieljon.es> | 2017-05-17 01:13:47 +0930 |
---|---|---|
committer | daniel-Jones <daniel@danieljon.es> | 2017-05-17 01:13:47 +0930 |
commit | 2ce2f6376152402c3fc0d750720770b963a7d3cf (patch) | |
tree | a6824736703ce0ceab02ba1e823e4a888700a0df | |
parent | 9ff573e9fe4c40ffb342ce2b215042c39b518aeb (diff) | |
download | RGB-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.
-rw-r--r-- | qt/RGBController/Makefile | 33 | ||||
-rwxr-xr-x | qt/RGBController/RGBController | bin | 107032 -> 136960 bytes | |||
-rwxr-xr-x | qt/RGBController/RGBController.pro | 6 | ||||
-rwxr-xr-x | qt/RGBController/RGBController.pro.user | 2 | ||||
-rwxr-xr-x | qt/RGBController/controllerwindow.cpp | 56 | ||||
-rwxr-xr-x | qt/RGBController/controllerwindow.h | 8 | ||||
-rw-r--r-- | qt/RGBController/controllerwindow.o | bin | 132072 -> 0 bytes | |||
-rw-r--r-- | qt/RGBController/controllerwindow.ui | 1006 | ||||
-rw-r--r-- | qt/RGBController/irc.cpp | 96 | ||||
-rw-r--r-- | qt/RGBController/irc.h | 33 | ||||
-rw-r--r-- | qt/RGBController/main.o | bin | 3176 -> 0 bytes | |||
-rw-r--r-- | qt/RGBController/moc_controllerwindow.cpp | 260 | ||||
-rw-r--r-- | qt/RGBController/moc_controllerwindow.o | bin | 17448 -> 0 bytes | |||
-rw-r--r-- | qt/RGBController/moc_predefs.h | 292 | ||||
-rw-r--r-- | qt/RGBController/tags | 53 | ||||
-rw-r--r-- | qt/RGBController/ui_controllerwindow.h | 418 |
16 files changed, 866 insertions, 1397 deletions
diff --git a/qt/RGBController/Makefile b/qt/RGBController/Makefile index 415befe..f615390 100644 --- a/qt/RGBController/Makefile +++ b/qt/RGBController/Makefile @@ -49,10 +49,14 @@ OBJECTS_DIR = ./ ####### Files SOURCES = main.cpp \ - controllerwindow.cpp moc_controllerwindow.cpp + controllerwindow.cpp \ + irc.cpp moc_controllerwindow.cpp \ + moc_irc.cpp OBJECTS = main.o \ controllerwindow.o \ - moc_controllerwindow.o + irc.o \ + moc_controllerwindow.o \ + moc_irc.o DIST = /usr/lib/qt/mkspecs/features/spec_pre.prf \ /usr/lib/qt/mkspecs/common/unix.conf \ /usr/lib/qt/mkspecs/common/linux.conf \ @@ -276,8 +280,10 @@ DIST = /usr/lib/qt/mkspecs/features/spec_pre.prf \ /usr/lib/qt/mkspecs/features/exceptions.prf \ /usr/lib/qt/mkspecs/features/yacc.prf \ /usr/lib/qt/mkspecs/features/lex.prf \ - RGBController.pro controllerwindow.h main.cpp \ - controllerwindow.cpp + RGBController.pro controllerwindow.h \ + irc.h main.cpp \ + controllerwindow.cpp \ + irc.cpp QMAKE_TARGET = RGBController DESTDIR = TARGET = RGBController @@ -763,8 +769,8 @@ distdir: FORCE @test -d $(DISTDIR) || mkdir -p $(DISTDIR) $(COPY_FILE) --parents $(DIST) $(DISTDIR)/ $(COPY_FILE) --parents /usr/lib/qt/mkspecs/features/data/dummy.cpp $(DISTDIR)/ - $(COPY_FILE) --parents controllerwindow.h $(DISTDIR)/ - $(COPY_FILE) --parents main.cpp controllerwindow.cpp $(DISTDIR)/ + $(COPY_FILE) --parents controllerwindow.h irc.h $(DISTDIR)/ + $(COPY_FILE) --parents main.cpp controllerwindow.cpp irc.cpp $(DISTDIR)/ $(COPY_FILE) --parents controllerwindow.ui $(DISTDIR)/ @@ -797,15 +803,20 @@ compiler_moc_predefs_clean: moc_predefs.h: /usr/lib/qt/mkspecs/features/data/dummy.cpp g++ -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -Wall -W -dM -E -o moc_predefs.h /usr/lib/qt/mkspecs/features/data/dummy.cpp -compiler_moc_header_make_all: moc_controllerwindow.cpp +compiler_moc_header_make_all: moc_controllerwindow.cpp moc_irc.cpp compiler_moc_header_clean: - -$(DEL_FILE) moc_controllerwindow.cpp + -$(DEL_FILE) moc_controllerwindow.cpp moc_irc.cpp moc_controllerwindow.cpp: ui_controllerwindow.h \ controllerwindow.h \ moc_predefs.h \ /usr/bin/moc /usr/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I'/home/daniel_j/documents/school/2016 research project/RGBController/qt/RGBController' -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtSerialPort -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtCore -I/usr/include/c++/6.3.1 -I/usr/include/c++/6.3.1/x86_64-pc-linux-gnu -I/usr/include/c++/6.3.1/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.1/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.1/include-fixed -I/usr/include controllerwindow.h -o moc_controllerwindow.cpp +moc_irc.cpp: irc.h \ + moc_predefs.h \ + /usr/bin/moc + /usr/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I'/home/daniel_j/documents/school/2016 research project/RGBController/qt/RGBController' -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtSerialPort -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtCore -I/usr/include/c++/6.3.1 -I/usr/include/c++/6.3.1/x86_64-pc-linux-gnu -I/usr/include/c++/6.3.1/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.1/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.1/include-fixed -I/usr/include irc.h -o moc_irc.cpp + compiler_moc_source_make_all: compiler_moc_source_clean: compiler_uic_make_all: ui_controllerwindow.h @@ -833,9 +844,15 @@ controllerwindow.o: controllerwindow.cpp controllerwindow.h \ ui_controllerwindow.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o controllerwindow.o controllerwindow.cpp +irc.o: irc.cpp irc.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o irc.o irc.cpp + moc_controllerwindow.o: moc_controllerwindow.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_controllerwindow.o moc_controllerwindow.cpp +moc_irc.o: moc_irc.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_irc.o moc_irc.cpp + ####### Install install: FORCE diff --git a/qt/RGBController/RGBController b/qt/RGBController/RGBController Binary files differindex 318ea1e..7b54e8c 100755 --- a/qt/RGBController/RGBController +++ b/qt/RGBController/RGBController diff --git a/qt/RGBController/RGBController.pro b/qt/RGBController/RGBController.pro index 2496348..07060da 100755 --- a/qt/RGBController/RGBController.pro +++ b/qt/RGBController/RGBController.pro @@ -13,9 +13,11 @@ TEMPLATE = app SOURCES += main.cpp\ - controllerwindow.cpp + controllerwindow.cpp \ + irc.cpp -HEADERS += controllerwindow.h +HEADERS += controllerwindow.h \ + irc.h FORMS += controllerwindow.ui diff --git a/qt/RGBController/RGBController.pro.user b/qt/RGBController/RGBController.pro.user index 5074773..78aa01e 100755 --- a/qt/RGBController/RGBController.pro.user +++ b/qt/RGBController/RGBController.pro.user @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE QtCreatorProject> -<!-- Written by QtCreator 4.2.1, 2017-04-05T10:31:13. --> +<!-- Written by QtCreator 4.2.2, 2017-05-15T22:54:21. --> <qtcreator> <data> <variable>EnvironmentId</variable> diff --git a/qt/RGBController/controllerwindow.cpp b/qt/RGBController/controllerwindow.cpp index cfc2428..7c4f552 100755 --- a/qt/RGBController/controllerwindow.cpp +++ b/qt/RGBController/controllerwindow.cpp @@ -1,4 +1,4 @@ -#include "controllerwindow.h" +#include "controllerwindow.h" controllerWindow::controllerWindow(QWidget *parent) : QMainWindow(parent), @@ -12,7 +12,9 @@ controllerWindow::controllerWindow(QWidget *parent) : connect(ser, &QSerialPort::readyRead, this, &controllerWindow::read); ptimer = new QTimer(this); connect(ptimer, SIGNAL(timeout()), this, SLOT(ping())); + connect (&ircbot, SIGNAL(sendcmd(QString)), this, SLOT(cmdrecv(QString))); pingtries = 0; + irccon = false; /* disable buttons and widgets that should not be enabled yet, set slider values to 0 */ ui->disconnect_button->setEnabled(false); ui->connect_button->setEnabled(false); @@ -50,12 +52,6 @@ controllerWindow::controllerWindow(QWidget *parent) : ui->g_speed_slider->setValue(0); ui->b_speed_slider->setValue(0); ui->speed_slider->setValue(0); - ui->rfrom->setValue(100); - ui->rto->setValue(255); - ui->gfrom->setValue(100); - ui->gto->setValue(255); - ui->bfrom->setValue(100); - ui->bto->setValue(255); presetsfile = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/presets.txt"; tempfile = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/tmp.file"; /* set some crucial ints */ @@ -347,12 +343,6 @@ void controllerWindow::on_disconnect_button_clicked() ui->g_speed_slider->setValue(0); ui->b_speed_slider->setValue(0); ui->speed_slider->setValue(0); - ui->rfrom->setValue(100); - ui->rto->setValue(255); - ui->gfrom->setValue(100); - ui->gto->setValue(255); - ui->bfrom->setValue(100); - ui->bto->setValue(255); } else { /* I have no clue how we'd get here */ @@ -546,7 +536,8 @@ bool controllerWindow::serial_connect(QString port) ser->setFlowControl(QSerialPort::NoFlowControl); ser->open(QIODevice::ReadWrite); ser->waitForBytesWritten(9000); - if (ser->isWritable()) { + if (ser->isWritable()) + { return true; } } @@ -567,21 +558,21 @@ bool controllerWindow::serial_disconnect() void controllerWindow::send(QString com) { - data = ""; - //qDebug() << com; - data.append(com + "\n"); - if (ser->isOpen()) - ser->write(data); + data = ""; + qDebug() << "sending" << com; + data.append(com + "\n"); + if (ser->isOpen()) + ser->write(data); } void controllerWindow::rgb_change(int r, int g, int b) { - // NOT USED FUNCTION + // NOT USED FUNCTION /* here we send our rgb values to the serial port */ data = ""; /* the 0 is a hack, i need to look into it at some point */ - data.append("red=" + QString::number(r) + "," + QString::number(g) + "," + QString::number(b) + "\n"); + data.append("red=" + QString::number(r) + "," + QString::number(g) + "," + QString::number(b) + "\n"); if (ser->isOpen()) ser->write(data); } @@ -650,3 +641,26 @@ void controllerWindow::check_ping() } } } + +void controllerWindow::on_irc_connect_button_clicked() +{ + if (irccon == false) + { + irccon = true; + ircbot.setup(ui->irc_server_input->text(), ui->irc_bot_spinbox->value(), ui->irc_channel_input->text(), ui->irc_name_input->text()); + ui->irc_connect_button->setText("Disconnect"); + } + else + { + irccon = false; + ircbot.discon(); + ui->irc_connect_button->setText("Connect"); + } +} + +void controllerWindow::cmdrecv(QString cmd) +{ + qDebug() << "got cmd" << cmd; + send(cmd); + +} diff --git a/qt/RGBController/controllerwindow.h b/qt/RGBController/controllerwindow.h index 1fed07e..a9196d2 100755 --- a/qt/RGBController/controllerwindow.h +++ b/qt/RGBController/controllerwindow.h @@ -14,6 +14,7 @@ #include <QDir> #include <QTimer> #include "ui_controllerwindow.h" +#include "irc.h" namespace Ui { class controllerWindow; @@ -59,7 +60,8 @@ class controllerWindow : public QMainWindow QTimer *ptimer; bool tping; int pingtries; - + public slots: + void cmdrecv(QString cmd); private slots: /* these slots are used to trigger button clicks and drop down items selections etc */ void on_connect_button_clicked(); @@ -122,8 +124,12 @@ class controllerWindow : public QMainWindow void ping(); void check_ping(); + void on_irc_connect_button_clicked(); + private: Ui::controllerWindow *ui; + bool irccon; + irc ircbot; }; #endif // CONTROLLERWINDOW_H diff --git a/qt/RGBController/controllerwindow.o b/qt/RGBController/controllerwindow.o Binary files differdeleted file mode 100644 index 99fc93f..0000000 --- a/qt/RGBController/controllerwindow.o +++ /dev/null diff --git a/qt/RGBController/controllerwindow.ui b/qt/RGBController/controllerwindow.ui index 837abf2..63a91b1 100644 --- a/qt/RGBController/controllerwindow.ui +++ b/qt/RGBController/controllerwindow.ui @@ -9,8 +9,8 @@ <rect> <x>0</x> <y>0</y> - <width>238</width> - <height>629</height> + <width>364</width> + <height>238</height> </rect> </property> <property name="windowTitle"> @@ -18,401 +18,619 @@ </property> <widget class="QWidget" name="centralWidget"> <layout class="QGridLayout" name="gridLayout_2"> - <item row="11" column="0"> - <widget class="QPushButton" name="reload_preset_button"> - <property name="text"> - <string>Reload</string> - </property> - </widget> - </item> - <item row="8" column="1"> - <widget class="QPushButton" name="off_button"> - <property name="text"> - <string>Off</string> - </property> - </widget> - </item> - <item row="13" column="1"> - <widget class="QPushButton" name="preset_delete_button"> - <property name="text"> - <string>Delete</string> - </property> - </widget> - </item> - <item row="9" column="0"> - <widget class="QLabel" name="presets_label"> - <property name="text"> - <string>Presets</string> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QPushButton" name="disconnect_button"> - <property name="text"> - <string>Disconnect</string> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QComboBox" name="arduino_port_dropdown"/> - </item> - <item row="0" column="1"> - <widget class="QLabel" name="arduino_status_label"> - <property name="text"> - <string><font color = red>Disconnected</font></string> - </property> - </widget> - </item> - <item row="7" column="0"> - <widget class="QSlider" name="b_slider"> - <property name="minimumSize"> - <size> - <width>120</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>120</width> - <height>16777215</height> - </size> - </property> - <property name="maximum"> - <number>255</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="17" column="0"> - <widget class="QSlider" name="b_speed_slider"> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>500</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="20" column="0" colspan="2"> - <widget class="QTextEdit" name="info_log_textarea"/> - </item> - <item row="12" column="0"> - <widget class="QLineEdit" name="preset_name_textbox"/> - </item> - <item row="10" column="0"> - <widget class="QComboBox" name="presets_dropdown"> - <property name="minimumSize"> - <size> - <width>120</width> - <height>0</height> - </size> - </property> - </widget> - </item> - <item row="19" column="0"> - <widget class="QLabel" name="info_log_label"> - <property name="text"> - <string>Information log</string> - </property> - </widget> - </item> - <item row="6" column="1"> - <widget class="QPushButton" name="green_button"> - <property name="text"> - <string>Green</string> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QPushButton" name="refresh_port_button"> - <property name="text"> - <string>Refresh</string> - </property> - </widget> - </item> - <item row="16" column="0"> - <widget class="QSlider" name="g_speed_slider"> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>500</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="4" column="0"> - <widget class="QLabel" name="rgb_label"> - <property name="text"> - <string>RGB colors</string> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="status_label"> - <property name="text"> - <string>Status</string> - </property> - </widget> - </item> - <item row="12" column="1"> - <widget class="QPushButton" name="preset_save_button"> - <property name="text"> - <string>Save</string> - </property> - </widget> - </item> - <item row="6" column="0"> - <widget class="QSlider" name="g_slider"> - <property name="minimumSize"> - <size> - <width>120</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>120</width> - <height>16777215</height> - </size> - </property> - <property name="maximum"> - <number>255</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="15" column="0"> - <widget class="QSlider" name="r_speed_slider"> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>500</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="16" column="1"> - <widget class="QLabel" name="g_speed_label"> - <property name="text"> - <string>Green speed</string> - </property> - </widget> - </item> - <item row="5" column="1"> - <widget class="QPushButton" name="red_button"> - <property name="text"> - <string>Red</string> - </property> - </widget> - </item> <item row="7" column="1"> - <widget class="QPushButton" name="blue_button"> - <property name="text"> - <string>Blue</string> - </property> - </widget> - </item> - <item row="3" column="0"> - <widget class="QPushButton" name="connect_button"> - <property name="text"> - <string>Connect</string> - </property> + <widget class="QTabWidget" name="display_tab"> + <property name="currentIndex"> + <number>4</number> + </property> + <widget class="QWidget" name="status_tab"> + <attribute name="title"> + <string>Status</string> + </attribute> + <layout class="QFormLayout" name="formLayout"> + <item row="0" column="0"> + <layout class="QGridLayout" name="gridLayout_5"> + <item row="1" column="0"> + <widget class="QLabel" name="arduino_port_label"> + <property name="minimumSize"> + <size> + <width>120</width> + <height>0</height> + </size> + </property> + <property name="text"> + <string>Arduino port</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QPushButton" name="refresh_port_button"> + <property name="text"> + <string>Refresh</string> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="status_label"> + <property name="text"> + <string>Status</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QLabel" name="arduino_status_label"> + <property name="text"> + <string><font color = red>Disconnected</font></string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QComboBox" name="arduino_port_dropdown"/> + </item> + <item row="3" column="1"> + <widget class="QPushButton" name="disconnect_button"> + <property name="text"> + <string>Disconnect</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QPushButton" name="connect_button"> + <property name="text"> + <string>Connect</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <widget class="QWidget" name="color_tab"> + <attribute name="title"> + <string>Color</string> + </attribute> + <layout class="QFormLayout" name="formLayout_2"> + <item row="0" column="0"> + <widget class="QLabel" name="rgb_label"> + <property name="text"> + <string>RGB colors</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QSlider" name="r_slider"> + <property name="minimumSize"> + <size> + <width>120</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>120</width> + <height>16777215</height> + </size> + </property> + <property name="maximum"> + <number>255</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QPushButton" name="red_button"> + <property name="maximumSize"> + <size> + <width>90</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>Red</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QSlider" name="g_slider"> + <property name="minimumSize"> + <size> + <width>120</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>120</width> + <height>16777215</height> + </size> + </property> + <property name="maximum"> + <number>255</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QPushButton" name="green_button"> + <property name="maximumSize"> + <size> + <width>90</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>Green</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QSlider" name="b_slider"> + <property name="minimumSize"> + <size> + <width>120</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>120</width> + <height>16777215</height> + </size> + </property> + <property name="maximum"> + <number>255</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QPushButton" name="blue_button"> + <property name="maximumSize"> + <size> + <width>90</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>Blue</string> + </property> + </widget> + </item> + <item row="4" column="1"> + <widget class="QPushButton" name="off_button"> + <property name="maximumSize"> + <size> + <width>90</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>Off</string> + </property> + </widget> + </item> + </layout> + <zorder>rgb_label</zorder> + <zorder>r_slider</zorder> + <zorder>g_slider</zorder> + <zorder>b_slider</zorder> + <zorder>red_button</zorder> + <zorder>green_button</zorder> + <zorder>blue_button</zorder> + <zorder>off_button</zorder> + </widget> + <widget class="QWidget" name="fade_tab"> + <attribute name="title"> + <string>Fade</string> + </attribute> + <layout class="QFormLayout" name="formLayout_3"> + <item row="0" column="0"> + <layout class="QGridLayout" name="gridLayout"> + <item row="4" column="3"> + <widget class="QPushButton" name="blue_fade_button"> + <property name="text"> + <string>Blue toggle</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QSpinBox" name="gfrom"> + <property name="maximumSize"> + <size> + <width>50</width> + <height>16777215</height> + </size> + </property> + <property name="maximum"> + <number>255</number> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QLabel" name="g_to_label"> + <property name="text"> + <string>to</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLabel" name="r_to_label"> + <property name="text"> + <string>to</string> + </property> + </widget> + </item> + <item row="4" column="2"> + <widget class="QSpinBox" name="bto"> + <property name="maximumSize"> + <size> + <width>50</width> + <height>16777215</height> + </size> + </property> + <property name="maximum"> + <number>255</number> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="QSpinBox" name="rto"> + <property name="maximumSize"> + <size> + <width>50</width> + <height>16777215</height> + </size> + </property> + <property name="maximum"> + <number>255</number> + </property> + </widget> + </item> + <item row="4" column="0"> + <widget class="QSpinBox" name="bfrom"> + <property name="maximumSize"> + <size> + <width>50</width> + <height>16777215</height> + </size> + </property> + <property name="maximum"> + <number>255</number> + </property> + </widget> + </item> + <item row="3" column="3"> + <widget class="QPushButton" name="green_fade_button"> + <property name="text"> + <string>Green toggle</string> + </property> + </widget> + </item> + <item row="7" column="0"> + <widget class="QSlider" name="b_speed_slider"> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>500</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="6" column="0"> + <widget class="QSlider" name="g_speed_slider"> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>500</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="3" column="2"> + <widget class="QSpinBox" name="gto"> + <property name="maximumSize"> + <size> + <width>50</width> + <height>16777215</height> + </size> + </property> + <property name="maximum"> + <number>255</number> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QSpinBox" name="rfrom"> + <property name="maximumSize"> + <size> + <width>50</width> + <height>16777215</height> + </size> + </property> + <property name="maximum"> + <number>255</number> + </property> + </widget> + </item> + <item row="1" column="3"> + <widget class="QPushButton" name="red_fade_button"> + <property name="text"> + <string>Red toggle</string> + </property> + </widget> + </item> + <item row="4" column="1"> + <widget class="QLabel" name="_to_label"> + <property name="text"> + <string>to</string> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="fade_label"> + <property name="text"> + <string>Fade</string> + </property> + </widget> + </item> + <item row="5" column="0"> + <widget class="QSlider" name="r_speed_slider"> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>100</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="8" column="0"> + <widget class="QSlider" name="speed_slider"> + <property name="minimum"> + <number>10</number> + </property> + <property name="maximum"> + <number>500</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="5" column="2"> + <widget class="QLabel" name="r_speed_label"> + <property name="text"> + <string>Red speed</string> + </property> + </widget> + </item> + <item row="6" column="2"> + <widget class="QLabel" name="g_speed_label"> + <property name="text"> + <string>Green speed</string> + </property> + </widget> + </item> + <item row="7" column="2"> + <widget class="QLabel" name="b_speed_label"> + <property name="text"> + <string>Blue speed</string> + </property> + </widget> + </item> + <item row="8" column="2"> + <widget class="QPushButton" name="speed_button"> + <property name="text"> + <string>Speed</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <widget class="QWidget" name="presets_tab"> + <attribute name="title"> + <string>Presets</string> + </attribute> + <layout class="QFormLayout" name="formLayout_4"> + <item row="0" column="0"> + <widget class="QLabel" name="presets_label"> + <property name="text"> + <string>Presets</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QComboBox" name="presets_dropdown"> + <property name="minimumSize"> + <size> + <width>120</width> + <height>0</height> + </size> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QPushButton" name="set_preset_button"> + <property name="maximumSize"> + <size> + <width>90</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>Set</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QPushButton" name="reload_preset_button"> + <property name="text"> + <string>Reload</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLineEdit" name="preset_name_textbox"/> + </item> + <item row="3" column="1"> + <widget class="QPushButton" name="preset_save_button"> + <property name="maximumSize"> + <size> + <width>90</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>Save</string> + </property> + </widget> + </item> + <item row="4" column="1"> + <widget class="QPushButton" name="preset_delete_button"> + <property name="maximumSize"> + <size> + <width>90</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>Delete</string> + </property> + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="irc_tab"> + <attribute name="title"> + <string>IRC</string> + </attribute> + <layout class="QFormLayout" name="formLayout_5"> + <item row="0" column="0"> + <widget class="QLabel" name="irc_bot_label"> + <property name="text"> + <string>IRC bot</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="irc_server_label"> + <property name="text"> + <string>Server</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLineEdit" name="irc_server_input"> + <property name="text"> + <string>irc.danieljon.es</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QSpinBox" name="irc_bot_spinbox"> + <property name="maximumSize"> + <size> + <width>50</width> + <height>16777215</height> + </size> + </property> + <property name="maximum"> + <number>99999</number> + </property> + <property name="value"> + <number>6667</number> + </property> + </widget> + </item> + <item row="4" column="0"> + <widget class="QLabel" name="irc_channel_label"> + <property name="text"> + <string>Channel</string> + </property> + </widget> + </item> + <item row="5" column="0"> + <widget class="QLineEdit" name="irc_channel_input"> + <property name="text"> + <string>#csgo</string> + </property> + </widget> + </item> + <item row="6" column="0"> + <widget class="QLabel" name="irc_name_label"> + <property name="text"> + <string>Name</string> + </property> + </widget> + </item> + <item row="7" column="0"> + <widget class="QLineEdit" name="irc_name_input"> + <property name="text"> + <string>LightBot</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLabel" name="irc_port_label"> + <property name="text"> + <string>Port</string> + </property> + </widget> + </item> + <item row="8" column="0"> + <widget class="QPushButton" name="irc_connect_button"> + <property name="text"> + <string>Connect</string> + </property> + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="log_tab"> + <attribute name="title"> + <string>Log</string> + </attribute> + <layout class="QGridLayout" name="gridLayout_3"> + <item row="2" column="0"> + <widget class="QLineEdit" name="serial_input"/> + </item> + <item row="1" column="0"> + <widget class="QTextEdit" name="info_log_textarea"/> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="info_log_label"> + <property name="text"> + <string>Information log</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QPushButton" name="serial_send_button"> + <property name="text"> + <string>Send</string> + </property> + </widget> + </item> + </layout> + </widget> </widget> </item> - <item row="15" column="1"> - <widget class="QLabel" name="r_speed_label"> - <property name="text"> - <string>Red speed</string> - </property> - </widget> - </item> - <item row="5" column="0"> - <widget class="QSlider" name="r_slider"> - <property name="minimumSize"> - <size> - <width>120</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>120</width> - <height>16777215</height> - </size> - </property> - <property name="maximum"> - <number>255</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="10" column="1"> - <widget class="QPushButton" name="set_preset_button"> - <property name="text"> - <string>Set</string> - </property> - </widget> - </item> - <item row="14" column="0" colspan="2"> - <layout class="QGridLayout" name="gridLayout"> - <item row="4" column="3"> - <widget class="QPushButton" name="blue_fade_button"> - <property name="text"> - <string>Blue toggle</string> - </property> - </widget> - </item> - <item row="4" column="0"> - <widget class="QSpinBox" name="bfrom"> - <property name="maximum"> - <number>255</number> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QSpinBox" name="rto"> - <property name="maximum"> - <number>255</number> - </property> - </widget> - </item> - <item row="3" column="0"> - <widget class="QSpinBox" name="gfrom"> - <property name="maximum"> - <number>255</number> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QLabel" name="r_to_label"> - <property name="text"> - <string>to</string> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QSpinBox" name="rfrom"> - <property name="maximum"> - <number>255</number> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QLabel" name="g_to_label"> - <property name="text"> - <string>to</string> - </property> - </widget> - </item> - <item row="4" column="2"> - <widget class="QSpinBox" name="bto"> - <property name="maximum"> - <number>255</number> - </property> - </widget> - </item> - <item row="3" column="2"> - <widget class="QSpinBox" name="gto"> - <property name="maximum"> - <number>255</number> - </property> - </widget> - </item> - <item row="3" column="3"> - <widget class="QPushButton" name="green_fade_button"> - <property name="text"> - <string>Green toggle</string> - </property> - </widget> - </item> - <item row="1" column="3"> - <widget class="QPushButton" name="red_fade_button"> - <property name="text"> - <string>Red toggle</string> - </property> - </widget> - </item> - <item row="4" column="1"> - <widget class="QLabel" name="_to_label"> - <property name="text"> - <string>to</string> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="fade_label"> - <property name="text"> - <string>Fade</string> - </property> - </widget> - </item> - </layout> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="arduino_port_label"> - <property name="minimumSize"> - <size> - <width>120</width> - <height>0</height> - </size> - </property> - <property name="text"> - <string>Arduino port</string> - </property> - </widget> - </item> - <item row="17" column="1"> - <widget class="QLabel" name="b_speed_label"> - <property name="text"> - <string>Blue speed</string> - </property> - </widget> - </item> - <item row="18" column="1"> - <widget class="QPushButton" name="speed_button"> - <property name="text"> - <string>Speed</string> - </property> - </widget> - </item> - <item row="18" column="0"> - <widget class="QSlider" name="speed_slider"> - <property name="minimum"> - <number>10</number> - </property> - <property name="maximum"> - <number>500</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="21" column="1"> - <widget class="QPushButton" name="serial_send_button"> - <property name="text"> - <string>Send</string> - </property> - </widget> - </item> - <item row="21" column="0"> - <widget class="QLineEdit" name="serial_input"/> - </item> </layout> </widget> </widget> diff --git a/qt/RGBController/irc.cpp b/qt/RGBController/irc.cpp new file mode 100644 index 0000000..50f7fac --- /dev/null +++ b/qt/RGBController/irc.cpp @@ -0,0 +1,96 @@ +#include "irc.h" + +irc::irc(QObject *parent) : QObject(parent) +{ + +} + +void irc::setup(QString srv, int p, QString c, QString n) +{ + server = srv; + port = p; + channel = c; + name = n; + qDebug() << "irc::setup()"; + /* setup socket, connect signal/slot */ + socket = new QTcpSocket(this); + connect(socket, SIGNAL(readyRead()), this, SLOT(read())); + /* connect */ + con(); +} + +void irc::read() +{ + QString line = socket->readLine(); + if (line.contains("PING :")) + { + QString sline = "PONG :" + line.split(":")[1]; + socket->write(sline.toLatin1()); + } + QString tmp = name + " MODE " + name + " :+"; + if (line.contains(tmp)) + { + buf = "JOIN " + channel + "\r\n"; + socket->write(buf.toUtf8()); + } + if (line.contains("!")) /* mostl ikely a message to handle */ + handle(line); + if(socket->canReadLine()) + read(); + +} + +void irc::con() +{ + socket->connectToHost(server, port); + buf = "NICK " + name + "\r\n"; + socket->write(buf.toUtf8()); + buf = "USER " + name + " 8 * :" + name + "\r\n"; + socket->write(buf.toUtf8()); +} + +void irc::discon() +{ + socket->write("QUIT :elegant quit \r\n"); + socket->close(); +} + +void irc::handle(QString str) +{ + /* :Scruffy!Scruff@i.am.huskehhh.com PRIVMSG #csgo :You a vim faggot? */ + if (str.contains("PRIVMSG")) + { + + QString usr = str.split("!")[0].replace(":", ""); + QString msg = str.split("PRIVMSG")[1].split(":")[1]; + if (usr == "daniel_j") + { + if (msg.contains("!send")) + { + + msg.remove(QRegExp("[\\n\\t\\r]")); + msg.replace("!send ", ""); + qDebug() << "message for me"; + if (msg.contains(";")) + { + QStringList tmp = msg.split(";"); + for (int x = 0; x < tmp.size(); x++) + { + emit sendcmd(tmp.at(x)); + + } + } + else + { + emit sendcmd(msg); + } + } + } + } +} + +void irc::sendmsg(QString msg) +{ + buf = "PRIVMSG " + channel + " :" + msg + " \r\n"; + socket->write(buf.toUtf8()); +} 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 diff --git a/qt/RGBController/main.o b/qt/RGBController/main.o Binary files differdeleted file mode 100644 index c77f1fa..0000000 --- a/qt/RGBController/main.o +++ /dev/null diff --git a/qt/RGBController/moc_controllerwindow.cpp b/qt/RGBController/moc_controllerwindow.cpp deleted file mode 100644 index 0603691..0000000 --- a/qt/RGBController/moc_controllerwindow.cpp +++ /dev/null @@ -1,260 +0,0 @@ -/**************************************************************************** -** Meta object code from reading C++ file 'controllerwindow.h' -** -** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0) -** -** WARNING! All changes made in this file will be lost! -*****************************************************************************/ - -#include "controllerwindow.h" -#include <QtCore/qbytearray.h> -#include <QtCore/qmetatype.h> -#if !defined(Q_MOC_OUTPUT_REVISION) -#error "The header file 'controllerwindow.h' doesn't include <QObject>." -#elif Q_MOC_OUTPUT_REVISION != 67 -#error "This file was generated using the moc from 5.8.0. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" -#endif - -QT_BEGIN_MOC_NAMESPACE -QT_WARNING_PUSH -QT_WARNING_DISABLE_DEPRECATED -struct qt_meta_stringdata_controllerWindow_t { - QByteArrayData data[36]; - char stringdata0[823]; -}; -#define QT_MOC_LITERAL(idx, ofs, len) \ - Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ - qptrdiff(offsetof(qt_meta_stringdata_controllerWindow_t, stringdata0) + ofs \ - - idx * sizeof(QByteArrayData)) \ - ) -static const qt_meta_stringdata_controllerWindow_t qt_meta_stringdata_controllerWindow = { - { -QT_MOC_LITERAL(0, 0, 16), // "controllerWindow" -QT_MOC_LITERAL(1, 17, 25), // "on_connect_button_clicked" -QT_MOC_LITERAL(2, 43, 0), // "" -QT_MOC_LITERAL(3, 44, 28), // "on_disconnect_button_clicked" -QT_MOC_LITERAL(4, 73, 30), // "on_refresh_port_button_clicked" -QT_MOC_LITERAL(5, 104, 31), // "on_reload_preset_button_clicked" -QT_MOC_LITERAL(6, 136, 24), // "on_r_slider_valueChanged" -QT_MOC_LITERAL(7, 161, 5), // "value" -QT_MOC_LITERAL(8, 167, 24), // "on_g_slider_valueChanged" -QT_MOC_LITERAL(9, 192, 24), // "on_b_slider_valueChanged" -QT_MOC_LITERAL(10, 217, 21), // "on_red_button_clicked" -QT_MOC_LITERAL(11, 239, 23), // "on_green_button_clicked" -QT_MOC_LITERAL(12, 263, 22), // "on_blue_button_clicked" -QT_MOC_LITERAL(13, 286, 21), // "on_off_button_clicked" -QT_MOC_LITERAL(14, 308, 28), // "on_set_preset_button_clicked" -QT_MOC_LITERAL(15, 337, 39), // "on_presets_dropdown_currentIn..." -QT_MOC_LITERAL(16, 377, 5), // "index" -QT_MOC_LITERAL(17, 383, 29), // "on_preset_save_button_clicked" -QT_MOC_LITERAL(18, 413, 31), // "on_preset_delete_button_clicked" -QT_MOC_LITERAL(19, 445, 26), // "on_red_fade_button_clicked" -QT_MOC_LITERAL(20, 472, 28), // "on_green_fade_button_clicked" -QT_MOC_LITERAL(21, 501, 27), // "on_blue_fade_button_clicked" -QT_MOC_LITERAL(22, 529, 23), // "on_speed_button_clicked" -QT_MOC_LITERAL(23, 553, 30), // "on_r_speed_slider_valueChanged" -QT_MOC_LITERAL(24, 584, 30), // "on_g_speed_slider_valueChanged" -QT_MOC_LITERAL(25, 615, 30), // "on_b_speed_slider_valueChanged" -QT_MOC_LITERAL(26, 646, 21), // "on_rfrom_valueChanged" -QT_MOC_LITERAL(27, 668, 4), // "arg1" -QT_MOC_LITERAL(28, 673, 19), // "on_rto_valueChanged" -QT_MOC_LITERAL(29, 693, 21), // "on_gfrom_valueChanged" -QT_MOC_LITERAL(30, 715, 19), // "on_gto_valueChanged" -QT_MOC_LITERAL(31, 735, 21), // "on_bfrom_valueChanged" -QT_MOC_LITERAL(32, 757, 19), // "on_bto_valueChanged" -QT_MOC_LITERAL(33, 777, 29), // "on_serial_send_button_clicked" -QT_MOC_LITERAL(34, 807, 4), // "ping" -QT_MOC_LITERAL(35, 812, 10) // "check_ping" - - }, - "controllerWindow\0on_connect_button_clicked\0" - "\0on_disconnect_button_clicked\0" - "on_refresh_port_button_clicked\0" - "on_reload_preset_button_clicked\0" - "on_r_slider_valueChanged\0value\0" - "on_g_slider_valueChanged\0" - "on_b_slider_valueChanged\0on_red_button_clicked\0" - "on_green_button_clicked\0on_blue_button_clicked\0" - "on_off_button_clicked\0" - "on_set_preset_button_clicked\0" - "on_presets_dropdown_currentIndexChanged\0" - "index\0on_preset_save_button_clicked\0" - "on_preset_delete_button_clicked\0" - "on_red_fade_button_clicked\0" - "on_green_fade_button_clicked\0" - "on_blue_fade_button_clicked\0" - "on_speed_button_clicked\0" - "on_r_speed_slider_valueChanged\0" - "on_g_speed_slider_valueChanged\0" - "on_b_speed_slider_valueChanged\0" - "on_rfrom_valueChanged\0arg1\0" - "on_rto_valueChanged\0on_gfrom_valueChanged\0" - "on_gto_valueChanged\0on_bfrom_valueChanged\0" - "on_bto_valueChanged\0on_serial_send_button_clicked\0" - "ping\0check_ping" -}; -#undef QT_MOC_LITERAL - -static const uint qt_meta_data_controllerWindow[] = { - - // content: - 7, // revision - 0, // classname - 0, 0, // classinfo - 31, 14, // methods - 0, 0, // properties - 0, 0, // enums/sets - 0, 0, // constructors - 0, // flags - 0, // signalCount - - // slots: name, argc, parameters, tag, flags - 1, 0, 169, 2, 0x08 /* Private */, - 3, 0, 170, 2, 0x08 /* Private */, - 4, 0, 171, 2, 0x08 /* Private */, - 5, 0, 172, 2, 0x08 /* Private */, - 6, 1, 173, 2, 0x08 /* Private */, - 8, 1, 176, 2, 0x08 /* Private */, - 9, 1, 179, 2, 0x08 /* Private */, - 10, 0, 182, 2, 0x08 /* Private */, - 11, 0, 183, 2, 0x08 /* Private */, - 12, 0, 184, 2, 0x08 /* Private */, - 13, 0, 185, 2, 0x08 /* Private */, - 14, 0, 186, 2, 0x08 /* Private */, - 15, 1, 187, 2, 0x08 /* Private */, - 17, 0, 190, 2, 0x08 /* Private */, - 18, 0, 191, 2, 0x08 /* Private */, - 19, 0, 192, 2, 0x08 /* Private */, - 20, 0, 193, 2, 0x08 /* Private */, - 21, 0, 194, 2, 0x08 /* Private */, - 22, 0, 195, 2, 0x08 /* Private */, - 23, 1, 196, 2, 0x08 /* Private */, - 24, 1, 199, 2, 0x08 /* Private */, - 25, 1, 202, 2, 0x08 /* Private */, - 26, 1, 205, 2, 0x08 /* Private */, - 28, 1, 208, 2, 0x08 /* Private */, - 29, 1, 211, 2, 0x08 /* Private */, - 30, 1, 214, 2, 0x08 /* Private */, - 31, 1, 217, 2, 0x08 /* Private */, - 32, 1, 220, 2, 0x08 /* Private */, - 33, 0, 223, 2, 0x08 /* Private */, - 34, 0, 224, 2, 0x08 /* Private */, - 35, 0, 225, 2, 0x08 /* Private */, - - // slots: parameters - QMetaType::Void, - QMetaType::Void, - QMetaType::Void, - QMetaType::Void, - QMetaType::Void, QMetaType::Int, 7, - QMetaType::Void, QMetaType::Int, 7, - QMetaType::Void, QMetaType::Int, 7, - QMetaType::Void, - QMetaType::Void, - QMetaType::Void, - QMetaType::Void, - QMetaType::Void, - QMetaType::Void, QMetaType::Int, 16, - QMetaType::Void, - QMetaType::Void, - QMetaType::Void, - QMetaType::Void, - QMetaType::Void, - QMetaType::Void, - QMetaType::Void, QMetaType::Int, 7, - QMetaType::Void, QMetaType::Int, 7, - QMetaType::Void, QMetaType::Int, 7, - QMetaType::Void, QMetaType::Int, 27, - QMetaType::Void, QMetaType::Int, 27, - QMetaType::Void, QMetaType::Int, 27, - QMetaType::Void, QMetaType::Int, 27, - QMetaType::Void, QMetaType::Int, 27, - QMetaType::Void, QMetaType::Int, 27, - QMetaType::Void, - QMetaType::Void, - QMetaType::Void, - - 0 // eod -}; - -void controllerWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) -{ - if (_c == QMetaObject::InvokeMetaMethod) { - controllerWindow *_t = static_cast<controllerWindow *>(_o); - Q_UNUSED(_t) - switch (_id) { - case 0: _t->on_connect_button_clicked(); break; - case 1: _t->on_disconnect_button_clicked(); break; - case 2: _t->on_refresh_port_button_clicked(); break; - case 3: _t->on_reload_preset_button_clicked(); break; - case 4: _t->on_r_slider_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 5: _t->on_g_slider_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 6: _t->on_b_slider_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 7: _t->on_red_button_clicked(); break; - case 8: _t->on_green_button_clicked(); break; - case 9: _t->on_blue_button_clicked(); break; - case 10: _t->on_off_button_clicked(); break; - case 11: _t->on_set_preset_button_clicked(); break; - case 12: _t->on_presets_dropdown_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 13: _t->on_preset_save_button_clicked(); break; - case 14: _t->on_preset_delete_button_clicked(); break; - case 15: _t->on_red_fade_button_clicked(); break; - case 16: _t->on_green_fade_button_clicked(); break; - case 17: _t->on_blue_fade_button_clicked(); break; - case 18: _t->on_speed_button_clicked(); break; - case 19: _t->on_r_speed_slider_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 20: _t->on_g_speed_slider_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 21: _t->on_b_speed_slider_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 22: _t->on_rfrom_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 23: _t->on_rto_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 24: _t->on_gfrom_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 25: _t->on_gto_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 26: _t->on_bfrom_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 27: _t->on_bto_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 28: _t->on_serial_send_button_clicked(); break; - case 29: _t->ping(); break; - case 30: _t->check_ping(); break; - default: ; - } - } -} - -const QMetaObject controllerWindow::staticMetaObject = { - { &QMainWindow::staticMetaObject, qt_meta_stringdata_controllerWindow.data, - qt_meta_data_controllerWindow, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} -}; - - -const QMetaObject *controllerWindow::metaObject() const -{ - return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; -} - -void *controllerWindow::qt_metacast(const char *_clname) -{ - if (!_clname) return Q_NULLPTR; - if (!strcmp(_clname, qt_meta_stringdata_controllerWindow.stringdata0)) - return static_cast<void*>(const_cast< controllerWindow*>(this)); - return QMainWindow::qt_metacast(_clname); -} - -int controllerWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) -{ - _id = QMainWindow::qt_metacall(_c, _id, _a); - if (_id < 0) - return _id; - if (_c == QMetaObject::InvokeMetaMethod) { - if (_id < 31) - qt_static_metacall(this, _c, _id, _a); - _id -= 31; - } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { - if (_id < 31) - *reinterpret_cast<int*>(_a[0]) = -1; - _id -= 31; - } - return _id; -} -QT_WARNING_POP -QT_END_MOC_NAMESPACE diff --git a/qt/RGBController/moc_controllerwindow.o b/qt/RGBController/moc_controllerwindow.o Binary files differdeleted file mode 100644 index b5aef42..0000000 --- a/qt/RGBController/moc_controllerwindow.o +++ /dev/null diff --git a/qt/RGBController/moc_predefs.h b/qt/RGBController/moc_predefs.h deleted file mode 100644 index f7a843b..0000000 --- a/qt/RGBController/moc_predefs.h +++ /dev/null @@ -1,292 +0,0 @@ -#define __SSP_STRONG__ 3 -#define __DBL_MIN_EXP__ (-1021) -#define __cpp_attributes 200809 -#define __UINT_LEAST16_MAX__ 0xffff -#define __ATOMIC_ACQUIRE 2 -#define __FLT_MIN__ 1.17549435082228750797e-38F -#define __GCC_IEC_559_COMPLEX 2 -#define __cpp_aggregate_nsdmi 201304 -#define __UINT_LEAST8_TYPE__ unsigned char -#define __SIZEOF_FLOAT80__ 16 -#define __INTMAX_C(c) c ## L -#define __CHAR_BIT__ 8 -#define __UINT8_MAX__ 0xff -#define __WINT_MAX__ 0xffffffffU -#define __cpp_static_assert 200410 -#define __ORDER_LITTLE_ENDIAN__ 1234 -#define __SIZE_MAX__ 0xffffffffffffffffUL -#define __WCHAR_MAX__ 0x7fffffff -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 -#define __DBL_DENORM_MIN__ double(4.94065645841246544177e-324L) -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 -#define __GCC_ATOMIC_CHAR_LOCK_FREE 2 -#define __GCC_IEC_559 2 -#define __FLT_EVAL_METHOD__ 0 -#define __unix__ 1 -#define __cpp_binary_literals 201304 -#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 -#define __x86_64 1 -#define __cpp_variadic_templates 200704 -#define __UINT_FAST64_MAX__ 0xffffffffffffffffUL -#define __SIG_ATOMIC_TYPE__ int -#define __DBL_MIN_10_EXP__ (-307) -#define __FINITE_MATH_ONLY__ 0 -#define __cpp_variable_templates 201304 -#define __GNUC_PATCHLEVEL__ 1 -#define __UINT_FAST8_MAX__ 0xff -#define __has_include(STR) __has_include__(STR) -#define __DEC64_MAX_EXP__ 385 -#define __INT8_C(c) c -#define __UINT_LEAST64_MAX__ 0xffffffffffffffffUL -#define __SHRT_MAX__ 0x7fff -#define __LDBL_MAX__ 1.18973149535723176502e+4932L -#define __UINT_LEAST8_MAX__ 0xff -#define __GCC_ATOMIC_BOOL_LOCK_FREE 2 -#define __UINTMAX_TYPE__ long unsigned int -#define __linux 1 -#define __DEC32_EPSILON__ 1E-6DF -#define __OPTIMIZE__ 1 -#define __unix 1 -#define __UINT32_MAX__ 0xffffffffU -#define __GXX_EXPERIMENTAL_CXX0X__ 1 -#define __LDBL_MAX_EXP__ 16384 -#define __WINT_MIN__ 0U -#define __linux__ 1 -#define __SCHAR_MAX__ 0x7f -#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) -#define __INT64_C(c) c ## L -#define __DBL_DIG__ 15 -#define __GCC_ATOMIC_POINTER_LOCK_FREE 2 -#define __SIZEOF_INT__ 4 -#define __SIZEOF_POINTER__ 8 -#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 -#define __USER_LABEL_PREFIX__ -#define __STDC_HOSTED__ 1 -#define __LDBL_HAS_INFINITY__ 1 -#define __FLT_EPSILON__ 1.19209289550781250000e-7F -#define __GXX_WEAK__ 1 -#define __LDBL_MIN__ 3.36210314311209350626e-4932L -#define __DEC32_MAX__ 9.999999E96DF -#define __INT32_MAX__ 0x7fffffff -#define __SIZEOF_LONG__ 8 -#define __STDC_IEC_559__ 1 -#define __STDC_ISO_10646__ 201505L -#define __UINT16_C(c) c -#define __DECIMAL_DIG__ 21 -#define __gnu_linux__ 1 -#define __has_include_next(STR) __has_include_next__(STR) -#define __LDBL_HAS_QUIET_NAN__ 1 -#define __GNUC__ 6 -#define __GXX_RTTI 1 -#define __MMX__ 1 -#define __cpp_delegating_constructors 200604 -#define __FLT_HAS_DENORM__ 1 -#define __SIZEOF_LONG_DOUBLE__ 16 -#define __BIGGEST_ALIGNMENT__ 16 -#define __STDC_UTF_16__ 1 -#define __DBL_MAX__ double(1.79769313486231570815e+308L) -#define __cpp_raw_strings 200710 -#define __INT_FAST32_MAX__ 0x7fffffffffffffffL -#define __DBL_HAS_INFINITY__ 1 -#define __INT64_MAX__ 0x7fffffffffffffffL -#define __DEC32_MIN_EXP__ (-94) -#define __INT_FAST16_TYPE__ long int -#define __LDBL_HAS_DENORM__ 1 -#define __cplusplus 201402L -#define __cpp_ref_qualifiers 200710 -#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL -#define __INT_LEAST32_MAX__ 0x7fffffff -#define __DEC32_MIN__ 1E-95DF -#define __DEPRECATED 1 -#define __cpp_rvalue_references 200610 -#define __DBL_MAX_EXP__ 1024 -#define __DEC128_EPSILON__ 1E-33DL -#define __SSE2_MATH__ 1 -#define __ATOMIC_HLE_RELEASE 131072 -#define __PTRDIFF_MAX__ 0x7fffffffffffffffL -#define __amd64 1 -#define __STDC_NO_THREADS__ 1 -#define __ATOMIC_HLE_ACQUIRE 65536 -#define __GNUG__ 6 -#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL -#define __SIZEOF_SIZE_T__ 8 -#define __cpp_rvalue_reference 200610 -#define __cpp_nsdmi 200809 -#define __SIZEOF_WINT_T__ 4 -#define __cpp_initializer_lists 200806 -#define __cpp_hex_float 201603 -#define __GCC_HAVE_DWARF2_CFI_ASM 1 -#define __GXX_ABI_VERSION 1010 -#define __FLT_MIN_EXP__ (-125) -#define __cpp_lambdas 200907 -#define __INT_FAST64_TYPE__ long int -#define __DBL_MIN__ double(2.22507385850720138309e-308L) -#define __LP64__ 1 -#define __DECIMAL_BID_FORMAT__ 1 -#define __DEC128_MIN__ 1E-6143DL -#define __REGISTER_PREFIX__ -#define __UINT16_MAX__ 0xffff -#define __DBL_HAS_DENORM__ 1 -#define __UINT8_TYPE__ unsigned char -#define __FLT_MANT_DIG__ 24 -#define __VERSION__ "6.3.1 20170306" -#define __UINT64_C(c) c ## UL -#define __cpp_unicode_characters 200704 -#define _STDC_PREDEF_H 1 -#define __cpp_decltype_auto 201304 -#define __GCC_ATOMIC_INT_LOCK_FREE 2 -#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ -#define __STDC_IEC_559_COMPLEX__ 1 -#define __INT32_C(c) c -#define __DEC64_EPSILON__ 1E-15DD -#define __ORDER_PDP_ENDIAN__ 3412 -#define __DEC128_MIN_EXP__ (-6142) -#define __INT_FAST32_TYPE__ long int -#define __UINT_LEAST16_TYPE__ short unsigned int -#define unix 1 -#define __INT16_MAX__ 0x7fff -#define __cpp_rtti 199711 -#define __SIZE_TYPE__ long unsigned int -#define __UINT64_MAX__ 0xffffffffffffffffUL -#define __INT8_TYPE__ signed char -#define __cpp_digit_separators 201309 -#define __ELF__ 1 -#define __GCC_ASM_FLAG_OUTPUTS__ 1 -#define __FLT_RADIX__ 2 -#define __INT_LEAST16_TYPE__ short int -#define __LDBL_EPSILON__ 1.08420217248550443401e-19L -#define __UINTMAX_C(c) c ## UL -#define __GLIBCXX_BITSIZE_INT_N_0 128 -#define __k8 1 -#define __SIG_ATOMIC_MAX__ 0x7fffffff -#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 -#define __cpp_sized_deallocation 201309 -#define __SIZEOF_PTRDIFF_T__ 8 -#define __x86_64__ 1 -#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF -#define __INT_FAST16_MAX__ 0x7fffffffffffffffL -#define __UINT_FAST32_MAX__ 0xffffffffffffffffUL -#define __UINT_LEAST64_TYPE__ long unsigned int -#define __FLT_HAS_QUIET_NAN__ 1 -#define __FLT_MAX_10_EXP__ 38 -#define __LONG_MAX__ 0x7fffffffffffffffL -#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL -#define __FLT_HAS_INFINITY__ 1 -#define __cpp_unicode_literals 200710 -#define __UINT_FAST16_TYPE__ long unsigned int -#define __DEC64_MAX__ 9.999999999999999E384DD -#define __CHAR16_TYPE__ short unsigned int -#define __PRAGMA_REDEFINE_EXTNAME 1 -#define __SEG_FS 1 -#define __INT_LEAST16_MAX__ 0x7fff -#define __DEC64_MANT_DIG__ 16 -#define __UINT_LEAST32_MAX__ 0xffffffffU -#define __SEG_GS 1 -#define __GCC_ATOMIC_LONG_LOCK_FREE 2 -#define __INT_LEAST64_TYPE__ long int -#define __INT16_TYPE__ short int -#define __INT_LEAST8_TYPE__ signed char -#define __DEC32_MAX_EXP__ 97 -#define __INT_FAST8_MAX__ 0x7f -#define __INTPTR_MAX__ 0x7fffffffffffffffL -#define linux 1 -#define __cpp_range_based_for 200907 -#define __SSE2__ 1 -#define __EXCEPTIONS 1 -#define __LDBL_MANT_DIG__ 64 -#define __DBL_HAS_QUIET_NAN__ 1 -#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) -#define __code_model_small__ 1 -#define __cpp_return_type_deduction 201304 -#define __k8__ 1 -#define __INTPTR_TYPE__ long int -#define __UINT16_TYPE__ short unsigned int -#define __WCHAR_TYPE__ int -#define __SIZEOF_FLOAT__ 4 -#define __UINTPTR_MAX__ 0xffffffffffffffffUL -#define __DEC64_MIN_EXP__ (-382) -#define __cpp_decltype 200707 -#define __INT_FAST64_MAX__ 0x7fffffffffffffffL -#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 -#define __FLT_DIG__ 6 -#define __UINT_FAST64_TYPE__ long unsigned int -#define __INT_MAX__ 0x7fffffff -#define __amd64__ 1 -#define __INT64_TYPE__ long int -#define __FLT_MAX_EXP__ 128 -#define __ORDER_BIG_ENDIAN__ 4321 -#define __DBL_MANT_DIG__ 53 -#define __cpp_inheriting_constructors 200802 -#define __SIZEOF_FLOAT128__ 16 -#define __INT_LEAST64_MAX__ 0x7fffffffffffffffL -#define __DEC64_MIN__ 1E-383DD -#define __WINT_TYPE__ unsigned int -#define __UINT_LEAST32_TYPE__ unsigned int -#define __SIZEOF_SHORT__ 2 -#define __SSE__ 1 -#define __LDBL_MIN_EXP__ (-16381) -#define __INT_LEAST8_MAX__ 0x7f -#define __SIZEOF_INT128__ 16 -#define __LDBL_MAX_10_EXP__ 4932 -#define __ATOMIC_RELAXED 0 -#define __DBL_EPSILON__ double(2.22044604925031308085e-16L) -#define _LP64 1 -#define __UINT8_C(c) c -#define __INT_LEAST32_TYPE__ int -#define __SIZEOF_WCHAR_T__ 4 -#define __UINT64_TYPE__ long unsigned int -#define __INT_FAST8_TYPE__ signed char -#define __GNUC_STDC_INLINE__ 1 -#define __DBL_DECIMAL_DIG__ 17 -#define __STDC_UTF_32__ 1 -#define __FXSR__ 1 -#define __DEC_EVAL_METHOD__ 2 -#define __cpp_runtime_arrays 198712 -#define __UINT32_C(c) c ## U -#define __INTMAX_MAX__ 0x7fffffffffffffffL -#define __cpp_alias_templates 200704 -#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ -#define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F -#define __INT8_MAX__ 0x7f -#define __UINT_FAST32_TYPE__ long unsigned int -#define __CHAR32_TYPE__ unsigned int -#define __FLT_MAX__ 3.40282346638528859812e+38F -#define __cpp_constexpr 201304 -#define __INT32_TYPE__ int -#define __SIZEOF_DOUBLE__ 8 -#define __cpp_exceptions 199711 -#define __INTMAX_TYPE__ long int -#define __DEC128_MAX_EXP__ 6145 -#define __ATOMIC_CONSUME 1 -#define __GNUC_MINOR__ 3 -#define __GLIBCXX_TYPE_INT_N_0 __int128 -#define __UINTMAX_MAX__ 0xffffffffffffffffUL -#define __DEC32_MANT_DIG__ 7 -#define __DBL_MAX_10_EXP__ 308 -#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L -#define __INT16_C(c) c -#define __cpp_generic_lambdas 201304 -#define __STDC__ 1 -#define __PTRDIFF_TYPE__ long int -#define __ATOMIC_SEQ_CST 5 -#define __UINT32_TYPE__ unsigned int -#define __UINTPTR_TYPE__ long unsigned int -#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD -#define __DEC128_MANT_DIG__ 34 -#define __LDBL_MIN_10_EXP__ (-4931) -#define __SSE_MATH__ 1 -#define __SIZEOF_LONG_LONG__ 8 -#define __cpp_user_defined_literals 200809 -#define __GCC_ATOMIC_LLONG_LOCK_FREE 2 -#define __LDBL_DIG__ 18 -#define __FLT_DECIMAL_DIG__ 9 -#define __UINT_FAST16_MAX__ 0xffffffffffffffffUL -#define __FLT_MIN_10_EXP__ (-37) -#define __GCC_ATOMIC_SHORT_LOCK_FREE 2 -#define __UINT_FAST8_TYPE__ unsigned char -#define _GNU_SOURCE 1 -#define __cpp_init_captures 201304 -#define __ATOMIC_ACQ_REL 4 -#define __ATOMIC_RELEASE 3 diff --git a/qt/RGBController/tags b/qt/RGBController/tags new file mode 100644 index 0000000..fb3f266 --- /dev/null +++ b/qt/RGBController/tags @@ -0,0 +1,53 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ +!_TAG_PROGRAM_NAME Exuberant Ctags // +!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ +!_TAG_PROGRAM_VERSION 5.8 // +check_ping controllerwindow.cpp /^void controllerWindow::check_ping()$/;" f class:controllerWindow +controllerWindow controllerwindow.cpp /^controllerWindow::controllerWindow(QWidget *parent) :$/;" f class:controllerWindow +delete_preset controllerwindow.cpp /^void controllerWindow::delete_preset(QString name)$/;" f class:controllerWindow +info_log controllerwindow.cpp /^void controllerWindow::info_log(QString text)$/;" f class:controllerWindow +load_presets controllerwindow.cpp /^void controllerWindow::load_presets()$/;" f class:controllerWindow +on_b_slider_valueChanged controllerwindow.cpp /^void controllerWindow::on_b_slider_valueChanged(int value)$/;" f class:controllerWindow +on_b_speed_slider_valueChanged controllerwindow.cpp /^void controllerWindow::on_b_speed_slider_valueChanged(int value)$/;" f class:controllerWindow +on_bfrom_valueChanged controllerwindow.cpp /^void controllerWindow::on_bfrom_valueChanged(int arg1)$/;" f class:controllerWindow +on_blue_button_clicked controllerwindow.cpp /^void controllerWindow::on_blue_button_clicked()$/;" f class:controllerWindow +on_blue_fade_button_clicked controllerwindow.cpp /^void controllerWindow::on_blue_fade_button_clicked()$/;" f class:controllerWindow +on_bto_valueChanged controllerwindow.cpp /^void controllerWindow::on_bto_valueChanged(int arg1)$/;" f class:controllerWindow +on_connect_button_clicked controllerwindow.cpp /^void controllerWindow::on_connect_button_clicked()$/;" f class:controllerWindow +on_disconnect_button_clicked controllerwindow.cpp /^void controllerWindow::on_disconnect_button_clicked()$/;" f class:controllerWindow +on_g_slider_valueChanged controllerwindow.cpp /^void controllerWindow::on_g_slider_valueChanged(int value)$/;" f class:controllerWindow +on_g_speed_slider_valueChanged controllerwindow.cpp /^void controllerWindow::on_g_speed_slider_valueChanged(int value)$/;" f class:controllerWindow +on_gfrom_valueChanged controllerwindow.cpp /^void controllerWindow::on_gfrom_valueChanged(int arg1)$/;" f class:controllerWindow +on_green_button_clicked controllerwindow.cpp /^void controllerWindow::on_green_button_clicked()$/;" f class:controllerWindow +on_green_fade_button_clicked controllerwindow.cpp /^void controllerWindow::on_green_fade_button_clicked()$/;" f class:controllerWindow +on_gto_valueChanged controllerwindow.cpp /^void controllerWindow::on_gto_valueChanged(int arg1)$/;" f class:controllerWindow +on_off_button_clicked controllerwindow.cpp /^void controllerWindow::on_off_button_clicked()$/;" f class:controllerWindow +on_preset_delete_button_clicked controllerwindow.cpp /^void controllerWindow::on_preset_delete_button_clicked()$/;" f class:controllerWindow +on_preset_save_button_clicked controllerwindow.cpp /^void controllerWindow::on_preset_save_button_clicked()$/;" f class:controllerWindow +on_presets_dropdown_currentIndexChanged controllerwindow.cpp /^void controllerWindow::on_presets_dropdown_currentIndexChanged(int index)$/;" f class:controllerWindow +on_r_slider_valueChanged controllerwindow.cpp /^void controllerWindow::on_r_slider_valueChanged(int value)$/;" f class:controllerWindow +on_r_speed_slider_valueChanged controllerwindow.cpp /^void controllerWindow::on_r_speed_slider_valueChanged(int value)$/;" f class:controllerWindow +on_red_button_clicked controllerwindow.cpp /^void controllerWindow::on_red_button_clicked()$/;" f class:controllerWindow +on_red_fade_button_clicked controllerwindow.cpp /^void controllerWindow::on_red_fade_button_clicked()$/;" f class:controllerWindow +on_refresh_port_button_clicked controllerwindow.cpp /^void controllerWindow::on_refresh_port_button_clicked()$/;" f class:controllerWindow +on_reload_preset_button_clicked controllerwindow.cpp /^void controllerWindow::on_reload_preset_button_clicked()$/;" f class:controllerWindow +on_rfrom_valueChanged controllerwindow.cpp /^void controllerWindow::on_rfrom_valueChanged(int arg1)$/;" f class:controllerWindow +on_rto_valueChanged controllerwindow.cpp /^void controllerWindow::on_rto_valueChanged(int arg1)$/;" f class:controllerWindow +on_serial_send_button_clicked controllerwindow.cpp /^void controllerWindow::on_serial_send_button_clicked()$/;" f class:controllerWindow +on_set_preset_button_clicked controllerwindow.cpp /^void controllerWindow::on_set_preset_button_clicked()$/;" f class:controllerWindow +on_speed_button_clicked controllerwindow.cpp /^void controllerWindow::on_speed_button_clicked()$/;" f class:controllerWindow +parse controllerwindow.cpp /^void controllerWindow::parse(QString message)$/;" f class:controllerWindow +ping controllerwindow.cpp /^void controllerWindow::ping()$/;" f class:controllerWindow +populate_serial_list controllerwindow.cpp /^void controllerWindow::populate_serial_list()$/;" f class:controllerWindow +read controllerwindow.cpp /^void controllerWindow::read()$/;" f class:controllerWindow +rgb_change controllerwindow.cpp /^void controllerWindow::rgb_change(int r, int g, int b)$/;" f class:controllerWindow +save_preset controllerwindow.cpp /^void controllerWindow::save_preset(QString name)$/;" f class:controllerWindow +send controllerwindow.cpp /^void controllerWindow::send(QString com)$/;" f class:controllerWindow +serial_connect controllerwindow.cpp /^bool controllerWindow::serial_connect(QString port)$/;" f class:controllerWindow +serial_disconnect controllerwindow.cpp /^bool controllerWindow::serial_disconnect()$/;" f class:controllerWindow +serial_rgb_change controllerwindow.cpp /^void controllerWindow::serial_rgb_change(int r, int g, int b)$/;" f class:controllerWindow +show_msgbox controllerwindow.cpp /^void controllerWindow::show_msgbox(QString message)$/;" f class:controllerWindow +show_question_box controllerwindow.cpp /^int controllerWindow::show_question_box(QString message, QString omessage)$/;" f class:controllerWindow +~controllerWindow controllerwindow.cpp /^controllerWindow::~controllerWindow()$/;" f class:controllerWindow diff --git a/qt/RGBController/ui_controllerwindow.h b/qt/RGBController/ui_controllerwindow.h deleted file mode 100644 index 02fed42..0000000 --- a/qt/RGBController/ui_controllerwindow.h +++ /dev/null @@ -1,418 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'controllerwindow.ui' -** -** Created by: Qt User Interface Compiler version 5.8.0 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_CONTROLLERWINDOW_H -#define UI_CONTROLLERWINDOW_H - -#include <QtCore/QVariant> -#include <QtWidgets/QAction> -#include <QtWidgets/QApplication> -#include <QtWidgets/QButtonGroup> -#include <QtWidgets/QComboBox> -#include <QtWidgets/QGridLayout> -#include <QtWidgets/QHeaderView> -#include <QtWidgets/QLabel> -#include <QtWidgets/QLineEdit> -#include <QtWidgets/QMainWindow> -#include <QtWidgets/QPushButton> -#include <QtWidgets/QSlider> -#include <QtWidgets/QSpinBox> -#include <QtWidgets/QTextEdit> -#include <QtWidgets/QWidget> - -QT_BEGIN_NAMESPACE - -class Ui_controllerWindow -{ -public: - QWidget *centralWidget; - QGridLayout *gridLayout_2; - QPushButton *reload_preset_button; - QPushButton *off_button; - QPushButton *preset_delete_button; - QLabel *presets_label; - QPushButton *disconnect_button; - QComboBox *arduino_port_dropdown; - QLabel *arduino_status_label; - QSlider *b_slider; - QSlider *b_speed_slider; - QTextEdit *info_log_textarea; - QLineEdit *preset_name_textbox; - QComboBox *presets_dropdown; - QLabel *info_log_label; - QPushButton *green_button; - QPushButton *refresh_port_button; - QSlider *g_speed_slider; - QLabel *rgb_label; - QLabel *status_label; - QPushButton *preset_save_button; - QSlider *g_slider; - QSlider *r_speed_slider; - QLabel *g_speed_label; - QPushButton *red_button; - QPushButton *blue_button; - QPushButton *connect_button; - QLabel *r_speed_label; - QSlider *r_slider; - QPushButton *set_preset_button; - QGridLayout *gridLayout; - QPushButton *blue_fade_button; - QSpinBox *bfrom; - QSpinBox *rto; - QSpinBox *gfrom; - QLabel *r_to_label; - QSpinBox *rfrom; - QLabel *g_to_label; - QSpinBox *bto; - QSpinBox *gto; - QPushButton *green_fade_button; - QPushButton *red_fade_button; - QLabel *_to_label; - QLabel *fade_label; - QLabel *arduino_port_label; - QLabel *b_speed_label; - QPushButton *speed_button; - QSlider *speed_slider; - QPushButton *serial_send_button; - QLineEdit *serial_input; - - void setupUi(QMainWindow *controllerWindow) - { - if (controllerWindow->objectName().isEmpty()) - controllerWindow->setObjectName(QStringLiteral("controllerWindow")); - controllerWindow->setWindowModality(Qt::WindowModal); - controllerWindow->resize(238, 629); - centralWidget = new QWidget(controllerWindow); - centralWidget->setObjectName(QStringLiteral("centralWidget")); - gridLayout_2 = new QGridLayout(centralWidget); - gridLayout_2->setSpacing(6); - gridLayout_2->setContentsMargins(11, 11, 11, 11); - gridLayout_2->setObjectName(QStringLiteral("gridLayout_2")); - reload_preset_button = new QPushButton(centralWidget); - reload_preset_button->setObjectName(QStringLiteral("reload_preset_button")); - - gridLayout_2->addWidget(reload_preset_button, 11, 0, 1, 1); - - off_button = new QPushButton(centralWidget); - off_button->setObjectName(QStringLiteral("off_button")); - - gridLayout_2->addWidget(off_button, 8, 1, 1, 1); - - preset_delete_button = new QPushButton(centralWidget); - preset_delete_button->setObjectName(QStringLiteral("preset_delete_button")); - - gridLayout_2->addWidget(preset_delete_button, 13, 1, 1, 1); - - presets_label = new QLabel(centralWidget); - presets_label->setObjectName(QStringLiteral("presets_label")); - - gridLayout_2->addWidget(presets_label, 9, 0, 1, 1); - - disconnect_button = new QPushButton(centralWidget); - disconnect_button->setObjectName(QStringLiteral("disconnect_button")); - - gridLayout_2->addWidget(disconnect_button, 3, 1, 1, 1); - - arduino_port_dropdown = new QComboBox(centralWidget); - arduino_port_dropdown->setObjectName(QStringLiteral("arduino_port_dropdown")); - - gridLayout_2->addWidget(arduino_port_dropdown, 1, 1, 1, 1); - - arduino_status_label = new QLabel(centralWidget); - arduino_status_label->setObjectName(QStringLiteral("arduino_status_label")); - - gridLayout_2->addWidget(arduino_status_label, 0, 1, 1, 1); - - b_slider = new QSlider(centralWidget); - b_slider->setObjectName(QStringLiteral("b_slider")); - b_slider->setMinimumSize(QSize(120, 0)); - b_slider->setMaximumSize(QSize(120, 16777215)); - b_slider->setMaximum(255); - b_slider->setOrientation(Qt::Horizontal); - - gridLayout_2->addWidget(b_slider, 7, 0, 1, 1); - - b_speed_slider = new QSlider(centralWidget); - b_speed_slider->setObjectName(QStringLiteral("b_speed_slider")); - b_speed_slider->setMinimum(1); - b_speed_slider->setMaximum(500); - b_speed_slider->setOrientation(Qt::Horizontal); - - gridLayout_2->addWidget(b_speed_slider, 17, 0, 1, 1); - - info_log_textarea = new QTextEdit(centralWidget); - info_log_textarea->setObjectName(QStringLiteral("info_log_textarea")); - - gridLayout_2->addWidget(info_log_textarea, 20, 0, 1, 2); - - preset_name_textbox = new QLineEdit(centralWidget); - preset_name_textbox->setObjectName(QStringLiteral("preset_name_textbox")); - - gridLayout_2->addWidget(preset_name_textbox, 12, 0, 1, 1); - - presets_dropdown = new QComboBox(centralWidget); - presets_dropdown->setObjectName(QStringLiteral("presets_dropdown")); - presets_dropdown->setMinimumSize(QSize(120, 0)); - - gridLayout_2->addWidget(presets_dropdown, 10, 0, 1, 1); - - info_log_label = new QLabel(centralWidget); - info_log_label->setObjectName(QStringLiteral("info_log_label")); - - gridLayout_2->addWidget(info_log_label, 19, 0, 1, 1); - - green_button = new QPushButton(centralWidget); - green_button->setObjectName(QStringLiteral("green_button")); - - gridLayout_2->addWidget(green_button, 6, 1, 1, 1); - - refresh_port_button = new QPushButton(centralWidget); - refresh_port_button->setObjectName(QStringLiteral("refresh_port_button")); - - gridLayout_2->addWidget(refresh_port_button, 2, 1, 1, 1); - - g_speed_slider = new QSlider(centralWidget); - g_speed_slider->setObjectName(QStringLiteral("g_speed_slider")); - g_speed_slider->setMinimum(1); - g_speed_slider->setMaximum(500); - g_speed_slider->setOrientation(Qt::Horizontal); - - gridLayout_2->addWidget(g_speed_slider, 16, 0, 1, 1); - - rgb_label = new QLabel(centralWidget); - rgb_label->setObjectName(QStringLiteral("rgb_label")); - - gridLayout_2->addWidget(rgb_label, 4, 0, 1, 1); - - status_label = new QLabel(centralWidget); - status_label->setObjectName(QStringLiteral("status_label")); - - gridLayout_2->addWidget(status_label, 0, 0, 1, 1); - - preset_save_button = new QPushButton(centralWidget); - preset_save_button->setObjectName(QStringLiteral("preset_save_button")); - - gridLayout_2->addWidget(preset_save_button, 12, 1, 1, 1); - - g_slider = new QSlider(centralWidget); - g_slider->setObjectName(QStringLiteral("g_slider")); - g_slider->setMinimumSize(QSize(120, 0)); - g_slider->setMaximumSize(QSize(120, 16777215)); - g_slider->setMaximum(255); - g_slider->setOrientation(Qt::Horizontal); - - gridLayout_2->addWidget(g_slider, 6, 0, 1, 1); - - r_speed_slider = new QSlider(centralWidget); - r_speed_slider->setObjectName(QStringLiteral("r_speed_slider")); - r_speed_slider->setMinimum(1); - r_speed_slider->setMaximum(500); - r_speed_slider->setOrientation(Qt::Horizontal); - - gridLayout_2->addWidget(r_speed_slider, 15, 0, 1, 1); - - g_speed_label = new QLabel(centralWidget); - g_speed_label->setObjectName(QStringLiteral("g_speed_label")); - - gridLayout_2->addWidget(g_speed_label, 16, 1, 1, 1); - - red_button = new QPushButton(centralWidget); - red_button->setObjectName(QStringLiteral("red_button")); - - gridLayout_2->addWidget(red_button, 5, 1, 1, 1); - - blue_button = new QPushButton(centralWidget); - blue_button->setObjectName(QStringLiteral("blue_button")); - - gridLayout_2->addWidget(blue_button, 7, 1, 1, 1); - - connect_button = new QPushButton(centralWidget); - connect_button->setObjectName(QStringLiteral("connect_button")); - - gridLayout_2->addWidget(connect_button, 3, 0, 1, 1); - - r_speed_label = new QLabel(centralWidget); - r_speed_label->setObjectName(QStringLiteral("r_speed_label")); - - gridLayout_2->addWidget(r_speed_label, 15, 1, 1, 1); - - r_slider = new QSlider(centralWidget); - r_slider->setObjectName(QStringLiteral("r_slider")); - r_slider->setMinimumSize(QSize(120, 0)); - r_slider->setMaximumSize(QSize(120, 16777215)); - r_slider->setMaximum(255); - r_slider->setOrientation(Qt::Horizontal); - - gridLayout_2->addWidget(r_slider, 5, 0, 1, 1); - - set_preset_button = new QPushButton(centralWidget); - set_preset_button->setObjectName(QStringLiteral("set_preset_button")); - - gridLayout_2->addWidget(set_preset_button, 10, 1, 1, 1); - - gridLayout = new QGridLayout(); - gridLayout->setSpacing(6); - gridLayout->setObjectName(QStringLiteral("gridLayout")); - blue_fade_button = new QPushButton(centralWidget); - blue_fade_button->setObjectName(QStringLiteral("blue_fade_button")); - - gridLayout->addWidget(blue_fade_button, 4, 3, 1, 1); - - bfrom = new QSpinBox(centralWidget); - bfrom->setObjectName(QStringLiteral("bfrom")); - bfrom->setMaximum(255); - - gridLayout->addWidget(bfrom, 4, 0, 1, 1); - - rto = new QSpinBox(centralWidget); - rto->setObjectName(QStringLiteral("rto")); - rto->setMaximum(255); - - gridLayout->addWidget(rto, 1, 2, 1, 1); - - gfrom = new QSpinBox(centralWidget); - gfrom->setObjectName(QStringLiteral("gfrom")); - gfrom->setMaximum(255); - - gridLayout->addWidget(gfrom, 3, 0, 1, 1); - - r_to_label = new QLabel(centralWidget); - r_to_label->setObjectName(QStringLiteral("r_to_label")); - - gridLayout->addWidget(r_to_label, 1, 1, 1, 1); - - rfrom = new QSpinBox(centralWidget); - rfrom->setObjectName(QStringLiteral("rfrom")); - rfrom->setMaximum(255); - - gridLayout->addWidget(rfrom, 1, 0, 1, 1); - - g_to_label = new QLabel(centralWidget); - g_to_label->setObjectName(QStringLiteral("g_to_label")); - - gridLayout->addWidget(g_to_label, 3, 1, 1, 1); - - bto = new QSpinBox(centralWidget); - bto->setObjectName(QStringLiteral("bto")); - bto->setMaximum(255); - - gridLayout->addWidget(bto, 4, 2, 1, 1); - - gto = new QSpinBox(centralWidget); - gto->setObjectName(QStringLiteral("gto")); - gto->setMaximum(255); - - gridLayout->addWidget(gto, 3, 2, 1, 1); - - green_fade_button = new QPushButton(centralWidget); - green_fade_button->setObjectName(QStringLiteral("green_fade_button")); - - gridLayout->addWidget(green_fade_button, 3, 3, 1, 1); - - red_fade_button = new QPushButton(centralWidget); - red_fade_button->setObjectName(QStringLiteral("red_fade_button")); - - gridLayout->addWidget(red_fade_button, 1, 3, 1, 1); - - _to_label = new QLabel(centralWidget); - _to_label->setObjectName(QStringLiteral("_to_label")); - - gridLayout->addWidget(_to_label, 4, 1, 1, 1); - - fade_label = new QLabel(centralWidget); - fade_label->setObjectName(QStringLiteral("fade_label")); - - gridLayout->addWidget(fade_label, 0, 0, 1, 1); - - - gridLayout_2->addLayout(gridLayout, 14, 0, 1, 2); - - arduino_port_label = new QLabel(centralWidget); - arduino_port_label->setObjectName(QStringLiteral("arduino_port_label")); - arduino_port_label->setMinimumSize(QSize(120, 0)); - - gridLayout_2->addWidget(arduino_port_label, 1, 0, 1, 1); - - b_speed_label = new QLabel(centralWidget); - b_speed_label->setObjectName(QStringLiteral("b_speed_label")); - - gridLayout_2->addWidget(b_speed_label, 17, 1, 1, 1); - - speed_button = new QPushButton(centralWidget); - speed_button->setObjectName(QStringLiteral("speed_button")); - - gridLayout_2->addWidget(speed_button, 18, 1, 1, 1); - - speed_slider = new QSlider(centralWidget); - speed_slider->setObjectName(QStringLiteral("speed_slider")); - speed_slider->setMinimum(10); - speed_slider->setMaximum(500); - speed_slider->setOrientation(Qt::Horizontal); - - gridLayout_2->addWidget(speed_slider, 18, 0, 1, 1); - - serial_send_button = new QPushButton(centralWidget); - serial_send_button->setObjectName(QStringLiteral("serial_send_button")); - - gridLayout_2->addWidget(serial_send_button, 21, 1, 1, 1); - - serial_input = new QLineEdit(centralWidget); - serial_input->setObjectName(QStringLiteral("serial_input")); - - gridLayout_2->addWidget(serial_input, 21, 0, 1, 1); - - controllerWindow->setCentralWidget(centralWidget); - - retranslateUi(controllerWindow); - - QMetaObject::connectSlotsByName(controllerWindow); - } // setupUi - - void retranslateUi(QMainWindow *controllerWindow) - { - controllerWindow->setWindowTitle(QApplication::translate("controllerWindow", "RGB Controller", Q_NULLPTR)); - reload_preset_button->setText(QApplication::translate("controllerWindow", "Reload", Q_NULLPTR)); - off_button->setText(QApplication::translate("controllerWindow", "Off", Q_NULLPTR)); - preset_delete_button->setText(QApplication::translate("controllerWindow", "Delete", Q_NULLPTR)); - presets_label->setText(QApplication::translate("controllerWindow", "Presets", Q_NULLPTR)); - disconnect_button->setText(QApplication::translate("controllerWindow", "Disconnect", Q_NULLPTR)); - arduino_status_label->setText(QApplication::translate("controllerWindow", "<font color = red>Disconnected</font>", Q_NULLPTR)); - info_log_label->setText(QApplication::translate("controllerWindow", "Information log", Q_NULLPTR)); - green_button->setText(QApplication::translate("controllerWindow", "Green", Q_NULLPTR)); - refresh_port_button->setText(QApplication::translate("controllerWindow", "Refresh", Q_NULLPTR)); - rgb_label->setText(QApplication::translate("controllerWindow", "RGB colors", Q_NULLPTR)); - status_label->setText(QApplication::translate("controllerWindow", "Status", Q_NULLPTR)); - preset_save_button->setText(QApplication::translate("controllerWindow", "Save", Q_NULLPTR)); - g_speed_label->setText(QApplication::translate("controllerWindow", "Green speed", Q_NULLPTR)); - red_button->setText(QApplication::translate("controllerWindow", "Red", Q_NULLPTR)); - blue_button->setText(QApplication::translate("controllerWindow", "Blue", Q_NULLPTR)); - connect_button->setText(QApplication::translate("controllerWindow", "Connect", Q_NULLPTR)); - r_speed_label->setText(QApplication::translate("controllerWindow", "Red speed", Q_NULLPTR)); - set_preset_button->setText(QApplication::translate("controllerWindow", "Set", Q_NULLPTR)); - blue_fade_button->setText(QApplication::translate("controllerWindow", "Blue toggle", Q_NULLPTR)); - r_to_label->setText(QApplication::translate("controllerWindow", "to", Q_NULLPTR)); - g_to_label->setText(QApplication::translate("controllerWindow", "to", Q_NULLPTR)); - green_fade_button->setText(QApplication::translate("controllerWindow", "Green toggle", Q_NULLPTR)); - red_fade_button->setText(QApplication::translate("controllerWindow", "Red toggle", Q_NULLPTR)); - _to_label->setText(QApplication::translate("controllerWindow", "to", Q_NULLPTR)); - fade_label->setText(QApplication::translate("controllerWindow", "Fade", Q_NULLPTR)); - arduino_port_label->setText(QApplication::translate("controllerWindow", "Arduino port", Q_NULLPTR)); - b_speed_label->setText(QApplication::translate("controllerWindow", "Blue speed", Q_NULLPTR)); - speed_button->setText(QApplication::translate("controllerWindow", "Speed", Q_NULLPTR)); - serial_send_button->setText(QApplication::translate("controllerWindow", "Send", Q_NULLPTR)); - } // retranslateUi - -}; - -namespace Ui { - class controllerWindow: public Ui_controllerWindow {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_CONTROLLERWINDOW_H |