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

Method ToString

plugins/base/utils/filter-selection.cpp:131–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131std::string FilterSelection::ToString(bool resolve) const
132{
133 switch (_type) {
134 case Type::ALL:
135 return obs_module_text("AdvSceneSwitcher.filterSelection.all");
136 case Type::SOURCE:
137 return _filter ? GetWeakSourceName(_filter) : _filterName;
138 case Type::VARIABLE: {
139 auto var = _variable.lock();
140 if (!var) {
141 return "";
142 }
143 if (resolve) {
144 return var->Name() + "[" + var->Value() + "]";
145 }
146 return var->Name();
147 }
148 default:
149 break;
150 }
151 return "";
152}
153
154FilterSelection FilterSelectionWidget::CurrentSelection()
155{

Callers 1

SetFilterMethod · 0.45

Calls 4

obs_module_textFunction · 0.85
GetWeakSourceNameFunction · 0.85
NameMethod · 0.45
ValueMethod · 0.45

Tested by

no test coverage detected