|
|
@ -24,9 +24,9 @@ public: \ |
|
|
|
Q_SIGNAL void SMALL_NAME ## LedChanged(char value) |
|
|
|
|
|
|
|
/*************************************************************************************************/ |
|
|
|
#define PUSH_BUTTON_NO_LED(CAPITAL_NAME, SMALL_NAME, FUNC_CODE) \ |
|
|
|
#define PUSH_BUTTON_PROBE_SLOT(CAPITAL_NAME, SMALL_NAME, SLOT_NUMBER) \ |
|
|
|
private: \ |
|
|
|
PushButton _ ## SMALL_NAME{FUNC_CODE}; \ |
|
|
|
PushButton _ ## SMALL_NAME{SLOT_NUMBER}; \ |
|
|
|
void init ## CAPITAL_NAME() \ |
|
|
|
{ \ |
|
|
|
connect(this, &Console::dataReady, _ ## SMALL_NAME.getLed(), &Led::newData); \ |
|
|
@ -37,19 +37,20 @@ public: \ |
|
|
|
void press ## CAPITAL_NAME() \ |
|
|
|
{ \ |
|
|
|
auto arr = _ ## SMALL_NAME.press(); \ |
|
|
|
_dataSender->send(arr); \ |
|
|
|
arr[5] = static_cast<char>(this->selectedProbe ## SLOT_NUMBER); \ |
|
|
|
_dataSender->sendProbeSlots(arr); \ |
|
|
|
emit changeProbeSelectionEnable ## SLOT_NUMBER(); \ |
|
|
|
} \ |
|
|
|
void release ## CAPITAL_NAME() \ |
|
|
|
{ \ |
|
|
|
auto arr = _ ## SMALL_NAME.release(); \ |
|
|
|
_dataSender->send(arr); \ |
|
|
|
} \ |
|
|
|
Q_SIGNAL void SMALL_NAME ## LedChanged(char value) |
|
|
|
Q_SIGNAL void SMALL_NAME ## LedChanged(char value); \ |
|
|
|
Q_SIGNAL void changeProbeSelectionEnable ## SLOT_NUMBER() |
|
|
|
|
|
|
|
/*************************************************************************************************/ |
|
|
|
#define ROTARY_BUTTON(CAPITAL_NAME, SMALL_NAME, FUNC_CODE, LED_FUNC_CODE) \ |
|
|
|
#define PUSH_BUTTON_NO_LED(CAPITAL_NAME, SMALL_NAME, FUNC_CODE) \ |
|
|
|
private: \ |
|
|
|
RotaryButton _ ## SMALL_NAME{FUNC_CODE, LED_FUNC_CODE}; \ |
|
|
|
PushButton _ ## SMALL_NAME {FUNC_CODE}; \ |
|
|
|
void init ## CAPITAL_NAME() \ |
|
|
|
{ \ |
|
|
|
connect(this, &Console::dataReady, _ ## SMALL_NAME.getLed(), &Led::newData); \ |
|
|
@ -57,17 +58,22 @@ private: \ |
|
|
|
SIGNAL(SMALL_NAME ## LedChanged(char))); \ |
|
|
|
} \ |
|
|
|
public: \ |
|
|
|
void rotate ## CAPITAL_NAME(int value) \ |
|
|
|
void press ## CAPITAL_NAME() \ |
|
|
|
{ \ |
|
|
|
auto arr = _ ## SMALL_NAME.rotate(value); \ |
|
|
|
auto arr = _ ## SMALL_NAME.press(); \ |
|
|
|
_dataSender->send(arr); \ |
|
|
|
} \ |
|
|
|
void release ## CAPITAL_NAME() \ |
|
|
|
{ \ |
|
|
|
auto arr = _ ## SMALL_NAME.release(); \ |
|
|
|
_dataSender->send(arr); \ |
|
|
|
} \ |
|
|
|
Q_SIGNAL void SMALL_NAME ## LedChanged(char value) |
|
|
|
|
|
|
|
/*************************************************************************************************/ |
|
|
|
#define ROTARY_BUTTON_NO_LED(CAPITAL_NAME, SMALL_NAME, FUNC_CODE) \ |
|
|
|
#define ROTARY_BUTTON(CAPITAL_NAME, SMALL_NAME, FUNC_CODE, LED_FUNC_CODE) \ |
|
|
|
private: \ |
|
|
|
RotaryButton _ ## SMALL_NAME{FUNC_CODE}; \ |
|
|
|
RotaryButton _ ## SMALL_NAME{FUNC_CODE, LED_FUNC_CODE}; \ |
|
|
|
void init ## CAPITAL_NAME() \ |
|
|
|
{ \ |
|
|
|
connect(this, &Console::dataReady, _ ## SMALL_NAME.getLed(), &Led::newData); \ |
|
|
@ -83,9 +89,9 @@ public: \ |
|
|
|
Q_SIGNAL void SMALL_NAME ## LedChanged(char value) |
|
|
|
|
|
|
|
/*************************************************************************************************/ |
|
|
|
#define DROP_DOWN(CAPITAL_NAME, SMALL_NAME, FUNC_CODE, LED_FUNC_CODE) \ |
|
|
|
#define ROTARY_BUTTON_NO_LED(CAPITAL_NAME, SMALL_NAME, FUNC_CODE) \ |
|
|
|
private: \ |
|
|
|
DropDown _ ## SMALL_NAME{FUNC_CODE, LED_FUNC_CODE}; \ |
|
|
|
RotaryButton _ ## SMALL_NAME{FUNC_CODE}; \ |
|
|
|
void init ## CAPITAL_NAME() \ |
|
|
|
{ \ |
|
|
|
connect(this, &Console::dataReady, _ ## SMALL_NAME.getLed(), &Led::newData); \ |
|
|
@ -93,9 +99,9 @@ private: \ |
|
|
|
SIGNAL(SMALL_NAME ## LedChanged(char))); \ |
|
|
|
} \ |
|
|
|
public: \ |
|
|
|
void select ## CAPITAL_NAME(int value) \ |
|
|
|
void rotate ## CAPITAL_NAME(int value) \ |
|
|
|
{ \ |
|
|
|
auto arr = _ ## SMALL_NAME.select(value); \ |
|
|
|
auto arr = _ ## SMALL_NAME.rotate(value); \ |
|
|
|
_dataSender->send(arr); \ |
|
|
|
} \ |
|
|
|
Q_SIGNAL void SMALL_NAME ## LedChanged(char value) |
|
|
|