| 694 | } |
| 695 | |
| 696 | void MacroActionHotkeyEdit::SetWidgetVisibility() |
| 697 | { |
| 698 | _entryLayout->removeWidget(_actionType); |
| 699 | _entryLayout->removeWidget(_hotkeyType); |
| 700 | _entryLayout->removeWidget(_obsHotkeys); |
| 701 | _entryLayout->removeWidget(_keys); |
| 702 | _entryLayout->removeWidget(_duration); |
| 703 | ClearLayout(_entryLayout); |
| 704 | PlaceWidgets( |
| 705 | obs_module_text( |
| 706 | _entryData->_action == |
| 707 | MacroActionHotkey::Action::OBS_HOTKEY |
| 708 | ? "AdvSceneSwitcher.action.hotkey.entry.obs" |
| 709 | : "AdvSceneSwitcher.action.hotkey.entry.custom"), |
| 710 | _entryLayout, |
| 711 | { |
| 712 | {"{{actionType}}", _actionType}, |
| 713 | {"{{hotkeyType}}", _hotkeyType}, |
| 714 | {"{{obsHotkeys}}", _obsHotkeys}, |
| 715 | {"{{keys}}", _keys}, |
| 716 | {"{{duration}}", _duration}, |
| 717 | }); |
| 718 | |
| 719 | _noKeyPressSimulationWarning->setVisible(!_entryData->_onlySendToObs && |
| 720 | !CanSimulateKeyPresses()); |
| 721 | SetLayoutVisible(_keyConfigLayout, |
| 722 | _entryData->_action == |
| 723 | MacroActionHotkey::Action::CUSTOM); |
| 724 | _duration->setVisible(_entryData->_action == |
| 725 | MacroActionHotkey::Action::CUSTOM); |
| 726 | _keys->setVisible(_entryData->_action == |
| 727 | MacroActionHotkey::Action::CUSTOM); |
| 728 | _onlySendToOBS->setVisible(_entryData->_action == |
| 729 | MacroActionHotkey::Action::CUSTOM); |
| 730 | _hotkeyType->setVisible(_entryData->_action == |
| 731 | MacroActionHotkey::Action::OBS_HOTKEY); |
| 732 | _obsHotkeys->setVisible(_entryData->_action == |
| 733 | MacroActionHotkey::Action::OBS_HOTKEY); |
| 734 | adjustSize(); |
| 735 | updateGeometry(); |
| 736 | } |
| 737 | |
| 738 | static QString getHotkeyDescriptionByName(const std::string &name) |
| 739 | { |
nothing calls this directly
no test coverage detected