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

Method Add

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

Source from the content-addressed store, hash-verified

96}
97
98void VariableTable::Add()
99{
100 auto newVariable = std::make_shared<Variable>();
101 auto accepted = VariableSettingsDialog::AskForSettings(
102 GetSettingsWindow(), *newVariable);
103 if (!accepted) {
104 return;
105 }
106
107 {
108 auto lock = LockContext();
109 auto &variables = GetVariables();
110 variables.emplace_back(newVariable);
111 }
112
113 VariableSignalManager::Instance()->Add(
114 QString::fromStdString(newVariable->Name()));
115}
116
117static QString formatSaveActionText(Variable *variable)
118{

Callers 1

signalImportedVariablesFunction · 0.45

Calls 3

LockContextFunction · 0.85
GetSettingsWindowFunction · 0.50
NameMethod · 0.45

Tested by

no test coverage detected