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

Function formatSaveActionText

lib/variables/variable-tab.cpp:117–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117static QString formatSaveActionText(Variable *variable)
118{
119 QString saveAction;
120
121 switch (variable->GetSaveAction()) {
122 case Variable::SaveAction::DONT_SAVE:
123 saveAction = obs_module_text(
124 "AdvSceneSwitcher.variable.save.dontSave");
125 break;
126 case Variable::SaveAction::SAVE:
127 saveAction =
128 obs_module_text("AdvSceneSwitcher.variable.save.save");
129 break;
130 case Variable::SaveAction::SET_DEFAULT:
131 saveAction =
132 QString(obs_module_text(
133 "AdvSceneSwitcher.variableTab.saveLoadBehavior.text.default"))
134 .arg(QString::fromStdString(
135 variable->GetDefaultValue()));
136 break;
137 default:
138 break;
139 }
140
141 return saveAction;
142}
143
144static QString formatLastUsedText(Variable *variable)
145{

Callers 1

getCellLabelsFunction · 0.85

Calls 3

obs_module_textFunction · 0.85
GetSaveActionMethod · 0.80
GetDefaultValueMethod · 0.45

Tested by

no test coverage detected