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

Method setActiveGroupIndex

app/src/UI/Taskbar.cpp:552–564  ·  view source on GitHub ↗

* @brief Sets the active group based on its index in the group model. */

Source from the content-addressed store, hash-verified

550 * @brief Sets the active group based on its index in the group model.
551 */
552void UI::Taskbar::setActiveGroupIndex(int index)
553{
554 auto model = workspaceModel();
555 if (model.count() > index && index >= 0) {
556 auto item = model[index];
557 auto map = item.toMap();
558 auto id = map.value("id", -1).toInt();
559 if (m_independentWorkspace && id >= 0)
560 m_desiredGroupId = id;
561
562 setActiveGroupId(id);
563 }
564}
565
566/**
567 * @brief Activates a workspace by id (used by the folder switcher sub-menus).

Callers

nothing calls this directly

Calls 2

countMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected