MCPcopy Create free account
hub / github.com/collin80/SavvyCAN / createNewScript

Method createNewScript

scriptingwindow.cpp:226–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226void ScriptingWindow::createNewScript()
227{
228 ScriptContainer *container;
229
230 container = new ScriptContainer();
231
232 container->fileName = "UNNAMED_" + QString::number((qrand() % 10000)) + ".js";
233 container->filePath = QString();
234 container->scriptText = QString();
235 container->setScriptWindow(this);
236 scripts.append(container);
237 ui->listLoadedScripts->addItem(container->fileName);
238
239 ui->listLoadedScripts->setCurrentRow(ui->listLoadedScripts->count() - 1);
240 changeCurrentScript();
241}
242
243void ScriptingWindow::deleteCurrentScript()
244{

Callers

nothing calls this directly

Calls 3

setScriptWindowMethod · 0.80
appendMethod · 0.80
addItemMethod · 0.80

Tested by

no test coverage detected