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

Method currentGroupPainterCode

app/src/DataModel/ProjectEditor.cpp:1033–1041  ·  view source on GitHub ↗

* @brief Returns the JS code attached to the selected painter group. */

Source from the content-addressed store, hash-verified

1031 * @brief Returns the JS code attached to the selected painter group.
1032 */
1033QString DataModel::ProjectEditor::currentGroupPainterCode() const
1034{
1035 const int gid = m_selectedGroup.groupId;
1036 const auto& groups = DataModel::ProjectModel::instance().groups();
1037 if (gid >= 0 && static_cast<size_t>(gid) < groups.size())
1038 return groups[gid].painterCode;
1039
1040 return m_selectedGroup.painterCode;
1041}
1042
1043/**
1044 * @brief Returns true when the selected group is a painter widget.

Callers 2

PainterCodeEditorMethod · 0.80
readCodeMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected