MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / installLua

Method installLua

app/src/DataModel/Scripting/DashboardApi.cpp:355–379  ·  view source on GitHub ↗

* @brief Installs the dashboard.* helpers as Lua globals. */

Source from the content-addressed store, hash-verified

353 * @brief Installs the dashboard.* helpers as Lua globals.
354 */
355void DataModel::DashboardApi::installLua(lua_State* L)
356{
357 Q_ASSERT(L);
358
359 lua_pushcfunction(L, luaClearPlots);
360 lua_setglobal(L, "clearPlots");
361
362 lua_pushcfunction(L, luaSetPlotPoints);
363 lua_setglobal(L, "setPlotPoints");
364
365 lua_pushcfunction(L, &luaSetVisibility<&UI::Dashboard::setTerminalEnabled>);
366 lua_setglobal(L, "setTerminalVisible");
367
368 lua_pushcfunction(L, &luaSetVisibility<&UI::Dashboard::setNotificationLogEnabled>);
369 lua_setglobal(L, "setNotificationLogVisible");
370
371 lua_pushcfunction(L, &luaSetVisibility<&UI::Dashboard::setClockEnabled>);
372 lua_setglobal(L, "setClockVisible");
373
374 lua_pushcfunction(L, &luaSetVisibility<&UI::Dashboard::setStopwatchEnabled>);
375 lua_setglobal(L, "setStopwatchVisible");
376
377 lua_pushcfunction(L, luaSetActiveWorkspace);
378 lua_setglobal(L, "setActiveWorkspace");
379}
380
381/**
382 * @brief Installs the dashboard.* helpers into a QJSEngine, reusing the bridge if attached.

Callers

nothing calls this directly

Calls 1

lua_setglobalFunction · 0.85

Tested by

no test coverage detected