kopia lustrzana https://gitlab.com/eliggett/wfview
Add default constructor for BUTTON()
rodzic
3ef1950dc2
commit
49d1cc085a
|
@ -225,17 +225,17 @@ void usbController::runTimer()
|
|||
}
|
||||
else if ((buttons >> i & 1) && !(tempButtons >> i & 1))
|
||||
{
|
||||
/* if (i < buttonList.size() && buttonList[i].offCommand.text && buttonList[i].onCommand.index>0) {
|
||||
qDebug() << "Off Button event:" << buttonList[i].offCommand.text->toPlainText();
|
||||
if (buttonList[i].offCommand.index > 2) // Band selection
|
||||
if (i < buttonList.size()) {
|
||||
qDebug() << "Off Button event:" << buttonList[i].offCommand.text;
|
||||
if (buttonList[i].offCommand.bandswitch)
|
||||
{
|
||||
emit setBand(buttonList[i].offCommand.index - 3);
|
||||
//emit setBand(buttonList[i].onCommand.index - 13);
|
||||
}
|
||||
else {
|
||||
emit button(false, i);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ enum cmds {
|
|||
};
|
||||
|
||||
struct COMMAND {
|
||||
COMMAND(){}
|
||||
COMMAND() {}
|
||||
|
||||
COMMAND(int index, QString text, cmds command, char suffix) :
|
||||
index(index), text(text), command(command), suffix(suffix), bandswitch(false){}
|
||||
|
@ -62,24 +62,26 @@ struct COMMAND {
|
|||
index(index), text(text), command(command),band(band), bandswitch(true) {}
|
||||
|
||||
int index;
|
||||
QString text;
|
||||
cmds command;
|
||||
char suffix;
|
||||
bool bandswitch;
|
||||
bandType band;
|
||||
QString text;
|
||||
bool bandswitch;
|
||||
};
|
||||
|
||||
struct BUTTON {
|
||||
BUTTON(char num, QRect pos, const QColor col) :
|
||||
num(num), pos(pos), textColour(col) {}
|
||||
BUTTON() {}
|
||||
|
||||
BUTTON(char num, QRect pos, const QColor textColour) :
|
||||
num(num), pos(pos), textColour(textColour) {}
|
||||
|
||||
quint8 num;
|
||||
QRect pos;
|
||||
const QColor textColour;
|
||||
int onEvent = 0;
|
||||
int offEvent = 0;
|
||||
COMMAND onCommand;
|
||||
COMMAND offCommand;
|
||||
const QColor textColour;
|
||||
QGraphicsTextItem* onText;
|
||||
QGraphicsTextItem* offText;
|
||||
};
|
||||
|
|
Ładowanie…
Reference in New Issue