← Back to Docs
  • index.html
  • Clayground
  • Clayground.Lab
  • ReadoutPanel
  • Clayground 2026.7
  • ReadoutPanel QML Type

    A titled panel of live readout rows, built from data. More...

    Import Statement: import Clayground.Lab
    Inherits:

    LabPanel

    Properties

    Detailed Description

    The legend/stats panel every lab grows: a row per thing, each with the colour it wears in the scene, its name, and what it reads right now. Three labs had written it out by hand before it moved here.

    Hand it rows and it builds them; add children as well and they stack underneath, which is where a caption or a BudgetBar goes.

    Rows are re-read whenever revision changes, which is the escape hatch for the usual trap: a simulation that mutates its state in place emits no change signal, so a row bound straight to it freezes at its first value.

    ReadoutPanel {
        title: LabLang.t("legend.title")
        width: LabTheme.px(258)
        revision: root.simRev
        rows: [
            { swatch: LabTheme.secondary, label: LabLang.t("sensor.fused"),
              value: LabLang.qty(root.fusedError, "m", 1) },
            { swatch: LabTheme.rose, label: LabLang.t("sensor.gps"),
              value: LabLang.qty(root.gpsError, "m", 1), dim: gps.available ? 1 : 0.35 }
        ]
        Text {
            width: parent.width
            text: LabLang.t("legend.caption")
            color: LabTheme.inkFaint; font.pixelSize: LabTheme.fontSmall
            font.family: LabTheme.handFont
        }
    }

    See also ReadoutRow, LabPanel, and Gauge.

    Property Documentation

    revision : int

    Bump to re-read rows after mutating state in place.


    rows : var

    The readings, as [{swatch, label, value, valueColor, dim, bar, showSwatch}].

    Only label and value are required.