* @brief Installs the dashboard.* helpers as Lua globals. */
| 353 | * @brief Installs the dashboard.* helpers as Lua globals. |
| 354 | */ |
| 355 | void 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. |
nothing calls this directly
no test coverage detected