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
| 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. |
| 61 | QString 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. |
no test coverage detected