#ifndef BMODESETTINGVIEWMODEL_H #define BMODESETTINGVIEWMODEL_H #include "viewModel/BaseViewModel.h" #include "viewModel/bMode/setting/DataBModeSetting.h" #include "viewModel/bMode/setting/dtoInternal/BModeSettingProbePropertes.h" #include "viewModel/bMode/setting/dtoInternal/BModeSettingPresetValues.h" #include "model/backendImageProcessor/type/EImageMode.h" class BModeSettingViewModel : public BaseViewModel { Q_OBJECT US_VIEW_MODEL(BModeSettingViewModel) SINGLETON(BModeSettingViewModel) private: DataBModeSetting_t _data; BModeSettingProbeProperties_t _prbProps; BModeSettingPresetValues_t _presetValues; EImageMode::eImageMode _imageMode; QList _depthList; bool _freezed; bool getPiValue(); double degree2Rad(int angle); bool isProbeLinear(); void setCriFilterEnable(); void setFrequencyEnable(); bool canEnableCriFilter(); bool canEnableFrequency(); int getRejectTrueValue(); void setAngle(int diff); bool getCriEnableStatus(); int getRoundedPreviousAngle(int diff); void setProbeDependentParams(); void setFrequencyValues(); void setAngleVisibility(); void checkAngleValidity(); void setFocusNumberValidValues(); void setFocusPointsValidValues(); int getMaxFocusPoints(int focusLenght, int focusNumber, int focusStep); void setFocusPointsValuesForHi(); void setFocusPointsValuesForFfc(); void setFocusPointsValues(); void setDepthValues(); QList getNoneHiFreqNames(); QList getHiFreqNames(); void applyPreset(); /**************************************************************************************************/ US_MULTI_BUTTON(sri, "SRI", (QList({""})), "", "", true, true, 0, false) US_SPIN_BOX(persist, "Persist", (QList({""})), "", "", true, false, 1) US_MULTI_BUTTON(frameFilter, "Frame Filter", (QList({""})), "", "", true, true, 0, false) US_SPIN_BOX(oti, "OTI", (QList({"Solid", "Normal", "Adipose", "Cystic"})), "", "", true, true, 0) US_MULTI_BUTTON(criFilter, "CRI Filter", (QList({"Low", "Mid", "High"})), "", "", true, true, 0, false) US_MULTI_BUTTON(lineFilter, "Line Filter", (QList({"Low", "High"})), "", "", true, true, 0, false) US_MULTI_BUTTON_CUSTOM_SETTER_BYPASS_ONLY(cri, "CRI", QList({""}), "", "", true, true, 0, false) US_SPIN_BOX(lineDensity, "Line Dens.", (QList({"Low", "Norm", "High"})), "", "", true, true, 0) US_SWITCH_BUTTON_CUSTOM_SETTER(ffc, "FFC", "", true, true, false) US_SWITCH_BUTTON_CUSTOM_SETTER(hi, "HI", "", true, true, false) US_SWITCH_BUTTON(virtualConvex, "Virtual Convex", "", true, true, false) US_SWITCH_BUTTON_CUSTOM_SETTER(maxAngle, "Max Angle", "", true, true, false) US_SPIN_BOX_CUSTOM_SETTER(frequency, "Frq", {""}, "", "", true, true, 0) US_SPIN_BOX(ao, "AO", (QList({""})), "", "%", true, true, 0) US_SPIN_BOX(enhance, "Enhance", (QList({"Off", "1", "2", "3", "4", "5"})), "", "", true, true, 0) US_SPIN_BOX(reject, "Reject", (QList({""})), "", "", true, true, 0) US_SPIN_BOX(dynamicContrast, "Dy.Cnt.", (QList({""})), "", "", true, true, 0) US_JOYSTICK_SIMPLE(angle, "Angle", true, true, 0) US_PROPERTY(bool, pi, true) US_INFO_BOX(depth, "Depth", (QList({""})), "", "cm", true, true, 0) US_INFO_BOX(focusPoints, "Foc.Pnt.", (QList({""})), "", "", true, true, 0) US_INFO_BOX_CUSTOM_SETTER(focusNumber, "Foc.Num.", (QList({""})), "", "", true, true, 0) US_INFO_BOX(gainB, "Gain", (QList({""})), "", "dB", true, true, 0) US_INFO_BOX_BOOL(hdZoom, "HD.Zoom", true, true, false) public: void freezeChanged(bool freeze); }; #endif //BMODESETTINGVIEWMODEL_H