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

Method createWorkspace

app/src/UI/Taskbar.cpp:1612–1622  ·  view source on GitHub ↗

* @brief Creates a new user-defined workspace and switches to it. */

Source from the content-addressed store, hash-verified

1610 * @brief Creates a new user-defined workspace and switches to it.
1611 */
1612void UI::Taskbar::createWorkspace(const QString& name)
1613{
1614 auto* pm = &DataModel::ProjectModel::instance();
1615 pm->addWorkspace(name);
1616
1617 const auto& workspaces = pm->activeWorkspaces();
1618 if (!workspaces.empty())
1619 setActiveGroupId(workspaces.back().workspaceId);
1620
1621 Q_EMIT workspaceModelChanged();
1622}
1623
1624/**
1625 * @brief Deletes or hides a workspace.

Callers

nothing calls this directly

Calls 2

addWorkspaceMethod · 0.80
emptyMethod · 0.80

Tested by

no test coverage detected