From 5ccc2fc3757256ba7e80ab542e200ed95353219b Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Mon, 19 Sep 2022 01:14:11 +0100 Subject: [PATCH] Fix for saving buttons --- usbcontroller.h | 4 +-- wfmain.cpp | 78 +++++++++++++++++++++---------------------------- wfmain.h | 2 -- 3 files changed, 36 insertions(+), 48 deletions(-) diff --git a/usbcontroller.h b/usbcontroller.h index 76a8114..27cfeb4 100644 --- a/usbcontroller.h +++ b/usbcontroller.h @@ -52,8 +52,8 @@ struct COMMAND { struct BUTTON { BUTTON() {} - BUTTON(quint8 dev, int num, QRect pos, const QColor textColour) : - dev(dev), num(num), pos(pos), textColour(textColour) {} + BUTTON(quint8 dev, int num, QRect pos, const QColor textColour, COMMAND* on, COMMAND* off) : + dev(dev), num(num), pos(pos), textColour(textColour), onCommand(on),offCommand(off) {} quint8 dev; int num; diff --git a/wfmain.cpp b/wfmain.cpp index cbbdb90..26a3980 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -1381,7 +1381,6 @@ void wfmain::setupUsbControllerDevice() connect(usbControllerDev, SIGNAL(setBand(int)), this, SLOT(setBand(int))); connect(this, SIGNAL(shuttleLed(bool, unsigned char)), usbControllerDev, SLOT(ledControl(bool, unsigned char))); connect(usbControllerDev, SIGNAL(newDevice(unsigned char, QVector