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

Method widgetCount

app/src/UI/Dashboard.cpp:523–536  ·  view source on GitHub ↗

* @brief Counts the number of instances of a specified widget type. */

Source from the content-addressed store, hash-verified

521 * @brief Counts the number of instances of a specified widget type.
522 */
523int UI::Dashboard::widgetCount(const SerialStudio::DashboardWidget widget) const
524{
525 if (SerialStudio::isGroupWidget(widget)) {
526 auto it = m_widgetGroups.constFind(widget);
527 return it != m_widgetGroups.cend() ? it->count() : 0;
528 }
529
530 if (SerialStudio::isDatasetWidget(widget)) {
531 auto it = m_widgetDatasets.constFind(widget);
532 return it != m_widgetDatasets.cend() ? it->count() : 0;
533 }
534
535 return 0;
536}
537
538//--------------------------------------------------------------------------------------------------
539// Specialized data access

Callers 6

tailFramesMethod · 0.45
VALIDATE_WIDGETFunction · 0.45
updateDataMethod · 0.45
animateTickMethod · 0.45
dispatchPointerMethod · 0.45

Calls 2

cendMethod · 0.80
countMethod · 0.45

Tested by

no test coverage detected