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

Method actions

app/src/UI/Dashboard.cpp:553–573  ·  view source on GitHub ↗

* @brief Returns a list of available dashboard actions with their metadata. */

Source from the content-addressed store, hash-verified

551 * @brief Returns a list of available dashboard actions with their metadata.
552 */
553QVariantList UI::Dashboard::actions() const
554{
555 QVariantList actions;
556 for (int i = 0; i < m_actions.count(); ++i) {
557 const auto& action = m_actions[i];
558
559 QVariantMap m;
560 m["id"] = i;
561 m["checked"] = false;
562 m["text"] = action.title;
563 m["icon"] = Misc::IconEngine::resolveActionIconSource(action.icon);
564 if (action.timerMode == DataModel::TimerMode::ToggleOnTrigger) {
565 if (m_timers.contains(i) && m_timers[i] && m_timers[i]->isActive())
566 m["checked"] = true;
567 }
568
569 actions.append(m);
570 }
571
572 return actions;
573}
574
575/**
576 * @brief Returns the runtime index of the action with the given public @p actionId, or -1.

Callers 10

getStatusMethod · 0.80
actionDeleteMethod · 0.80
actionDuplicateMethod · 0.80
actionsListMethod · 0.80
actionUpdateMethod · 0.80
validateMethod · 0.80
syncFromProjectModelMethod · 0.80
appendActionTreeItemsMethod · 0.80
selectActionItemMethod · 0.80
moveCurrentActionMethod · 0.80

Calls 4

countMethod · 0.45
containsMethod · 0.45
isActiveMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected