MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / readableName

Function readableName

pj_plotting/widget/src/FilterEditorPanel.cpp:61–72  ·  view source on GitHub ↗

Best human-readable label for a source curve: prefer the field display fields, falling back to the opaque catalog key only when those are empty. A materialized filter output is a single-column topic whose column is the generic "value" (derived_engine.cpp:413) — its identity lives in the topic name (the alias, e.g. "/angular_velocity/y[Absolute]"), so a bare "value" field is skipped in favour of t

Source from the content-addressed store, hash-verified

59// (the alias, e.g. "/angular_velocity/y[Absolute]"), so a bare "value" field is
60// skipped in favour of the topic name rather than shown verbatim.
61QString readableName(const CurveDescriptor& descriptor) {
62 if (!descriptor.field_name.isEmpty() && descriptor.field_name != QLatin1String("value")) {
63 return curveDisplayName(descriptor); // full "topic/field" path, as the legend shows it
64 }
65 if (!descriptor.topic_name.isEmpty()) {
66 return descriptor.topic_name;
67 }
68 if (!descriptor.field_path.isEmpty()) {
69 return descriptor.field_path;
70 }
71 return descriptor.name;
72}
73
74// The catalog key identifying one column of a topic in a dataset — the canonical
75// "dataset:.../topic:.../column:..." string the catalog and host plots key curves by.

Callers 4

populateSourcesMethod · 0.85
updateAliasMethod · 0.85
refreshPreviewMethod · 0.85
applyToSelectedMethod · 0.85

Calls 2

curveDisplayNameFunction · 0.85
isEmptyMethod · 0.45

Tested by

no test coverage detected