diff --git a/logic/include/viewModel/MainViewModel.h b/logic/include/viewModel/MainViewModel.h index b8b4ffc..0188514 100644 --- a/logic/include/viewModel/MainViewModel.h +++ b/logic/include/viewModel/MainViewModel.h @@ -20,11 +20,10 @@ class MainViewModel : public QtMvvm::ViewModel MVVM_PROPERTY(int, stepInc, 1) MVVM_PROPERTY(int, stepDec, -1) - //Probes - BUTTON_SLOT_LED_PROPERTY(slot1, Slot1, false, LED_COLOR_GREEN, 1) - BUTTON_SLOT_LED_PROPERTY(slot2, Slot2, false, LED_COLOR_WHITE, 2) - BUTTON_SLOT_LED_PROPERTY(slot3, Slot3, false, LED_COLOR_WHITE, 3) - BUTTON_SLOT_LED_PROPERTY(slot4, Slot4, false, LED_COLOR_WHITE, 4) + BUTTON_LED_PROPERTY(slot1, Slot1, false, LED_COLOR_GREEN) + BUTTON_LED_PROPERTY(slot2, Slot2, false, LED_COLOR_WHITE) + BUTTON_LED_PROPERTY(slot3, Slot3, false, LED_COLOR_WHITE) + BUTTON_LED_PROPERTY(slot4, Slot4, false, LED_COLOR_WHITE) MVVM_PROPERTY(QList, probeList, {}) diff --git a/logic/include/viewModel/utils/Property.h b/logic/include/viewModel/utils/Property.h index 6a3702c..db5ea7d 100644 --- a/logic/include/viewModel/utils/Property.h +++ b/logic/include/viewModel/utils/Property.h @@ -38,11 +38,6 @@ LED_PROPERTY(NAME, LED_DEF_VAL) \ BUTTON_PROPERTY(NAME, CAP_NAME, DEFAULT_VALUE) -/**************************************************************************************************/ -#define BUTTON_SLOT_LED_PROPERTY(NAME, CAP_NAME, DEFAULT_VALUE, LED_DEF_VAL, SLOT_NUMBER) \ - LED_PROPERTY(NAME, LED_DEF_VAL) \ - BUTTON_SLOT_PROPERTY(NAME, CAP_NAME, DEFAULT_VALUE, SLOT_NUMBER) - /**************************************************************************************************/ #define BUTTON_PROPERTY(NAME, CAP_NAME, DEFAULT_VALUE) \ MVVM_PROPERTY_CUSTOM(bool, NAME, DEFAULT_VALUE) \ @@ -55,18 +50,6 @@ } \ } \ -/**************************************************************************************************/ -#define BUTTON_SLOT_PROPERTY(NAME, CAP_NAME, DEFAULT_VALUE, SLOT_NUMBER) \ - MVVM_PROPERTY_CUSTOM(bool, NAME, DEFAULT_VALUE) \ - void NAME ## Handle() { \ - if(_ ## NAME){ \ - panel->press ## CAP_NAME(isProbeSelectionEnable ## SLOT_NUMBER()); \ - } \ - else { \ - panel->release ## CAP_NAME(); \ - } \ - } \ - /**************************************************************************************************/ #define LED_PROPERTY(NAME, LED_DEF_VAL) \ MVVM_PROPERTY(int, NAME ## Led, LED_DEF_VAL) \