MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / SetWidgetVisibility

Method SetWidgetVisibility

plugins/base/macro-action-hotkey.cpp:696–736  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

694}
695
696void 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
738static QString getHotkeyDescriptionByName(const std::string &name)
739{

Callers

nothing calls this directly

Calls 5

ClearLayoutFunction · 0.85
PlaceWidgetsFunction · 0.85
obs_module_textFunction · 0.85
SetLayoutVisibleFunction · 0.85
CanSimulateKeyPressesFunction · 0.50

Tested by

no test coverage detected