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

Method AskForSettings

lib/variables/variable.cpp:236–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236bool VariableSettingsDialog::AskForSettings(QWidget *parent, Variable &settings)
237{
238 VariableSettingsDialog dialog(parent, settings);
239 dialog.setWindowTitle(obs_module_text("AdvSceneSwitcher.windowTitle"));
240 if (dialog.exec() != DialogCode::Accepted) {
241 return false;
242 }
243
244 settings._name = dialog._name->text().toStdString();
245 settings.SetValue(dialog._value->toPlainText().toStdString());
246 settings._defaultValue =
247 dialog._defaultValue->toPlainText().toStdString();
248 settings._saveAction =
249 static_cast<Variable::SaveAction>(dialog._save->currentIndex());
250 setLastVariableChangeTime();
251
252 return true;
253}
254
255static bool AskForSettingsWrapper(QWidget *parent, Item &settings)
256{

Callers

nothing calls this directly

Calls 3

obs_module_textFunction · 0.85
SetValueMethod · 0.45

Tested by

no test coverage detected