* @brief Populates the tree under root with sources, actions, groups, datasets. */
| 2417 | * @brief Populates the tree under root with sources, actions, groups, datasets. |
| 2418 | */ |
| 2419 | void DataModel::ProjectEditor::buildTreeItems(QStandardItem* root, |
| 2420 | QHash<QString, bool>& expandedStates) |
| 2421 | { |
| 2422 | Q_ASSERT(root != nullptr); |
| 2423 | |
| 2424 | appendControlScriptTreeItem(root); |
| 2425 | #ifdef BUILD_COMMERCIAL |
| 2426 | appendMqttPublisherTreeItem(root); |
| 2427 | #endif |
| 2428 | |
| 2429 | appendActionTreeItems(root); |
| 2430 | appendSourceTreeItems(root); |
| 2431 | appendGroupTreeItems(root, expandedStates); |
| 2432 | appendSharedMemoryTreeItems(root, expandedStates); |
| 2433 | appendWorkspaceTreeItems(root, expandedStates); |
| 2434 | |
| 2435 | auto* spacer = new QStandardItem(" "); |
| 2436 | spacer->setData(" ", TreeViewText); |
| 2437 | spacer->setData("", TreeViewIcon); |
| 2438 | spacer->setData(-1, TreeViewFrameIndex); |
| 2439 | spacer->setEnabled(false); |
| 2440 | spacer->setSelectable(false); |
| 2441 | root->appendRow(spacer); |
| 2442 | } |
| 2443 | |
| 2444 | /** |
| 2445 | * @brief Restores the tree selection by matching IDs against the current view. |
nothing calls this directly
no test coverage detected