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

Function stableKeyForWindowId

app/src/UI/WindowManager.cpp:143–151  ·  view source on GitHub ↗

* @brief Returns the (widgetType, relativeIndex) identity for the given live * windowId, or an invalid key when the windowId is unknown. */

Source from the content-addressed store, hash-verified

141 * windowId, or an invalid key when the windowId is unknown.
142 */
143[[nodiscard]] static StableKey stableKeyForWindowId(int windowId)
144{
145 const auto& widgetMap = UI::Dashboard::instance().widgetMap();
146 const auto it = widgetMap.constFind(windowId);
147 if (it == widgetMap.cend())
148 return {};
149
150 return {static_cast<int>(it.value().first), it.value().second};
151}
152
153/**
154 * @brief Shrinks a snap rectangle when its bottom reaches the canvas floor,

Callers 1

serializeLayoutMethod · 0.85

Calls 2

cendMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected