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

Method registerStateCommands

app/src/API/Handlers/WindowHandler.cpp:97–116  ·  view source on GitHub ↗

* @brief Register window-state read/write commands. */

Source from the content-addressed store, hash-verified

95 * @brief Register window-state read/write commands.
96 */
97void API::Handlers::WindowHandler::registerStateCommands()
98{
99 auto& registry = CommandRegistry::instance();
100
101 registry.registerCommand(
102 QStringLiteral("ui.window.listWindowStates"),
103 QStringLiteral("Get window states array [{id, state}] for current group"),
104 API::emptySchema(),
105 &getWindowStates);
106 registry.registerCommand(
107 QStringLiteral("ui.window.setWindowState"),
108 QStringLiteral("Set window state (params: id int, state int: 0=normal,1=minimized,2=closed)"),
109 API::makeSchema({
110 { QStringLiteral("id"),QStringLiteral("integer"),QStringLiteral("The window ID") },
111 {QStringLiteral("state"),
112 QStringLiteral("integer"),
113 QStringLiteral("Window state: 0=normal, 1=minimized, 2=closed")}
114 }),
115 &setWindowState);
116}
117
118/**
119 * @brief Register layout save/load/serialize commands.

Callers

nothing calls this directly

Calls 3

emptySchemaFunction · 0.85
registerCommandMethod · 0.80
makeSchemaFunction · 0.70

Tested by

no test coverage detected