Server-side updates

Example module: hellotypes, live property.

All the previous pages reacted to a write coming from the client. A module can also evolve its own values on its own, typically from a QTimer:

QTimer *timer = new QTimer(this);
connect(timer, &QTimer::timeout, this, [this]()
{
    mValue += 2.0;
    getEltPrg("live", "progress")->setPrgValue(mValue, true);
});
timer->start(500);

No permission/directedit rule applies here: this path never goes through a client write, the module directly modifies its own datastore.

Organizing the display: devcat and group

devcat creates a tab in the interface; group, a sub-tab inside a devcat. Two properties sharing the same devcat appear in the same tab, one below the other.

One tab per property, for easy reading

Giving each property its own devcat avoids stacking several hard-to-read blocks in the same tab — especially useful as soon as a page presents several different families of data (like this module).

Isolating frequently-updated properties

A property is re-dumped as a whole to the client as soon as a single one of its elements changes. Mixing, within the same property, animated elements (every 500ms, say) with rarely-modified elements — an image, a video stream — makes the latter reload/flicker on every tick, for no reason.

Good practice: separate the frequent from the rare

Isolate frequently-updated elements in their own property, even within the same conceptual family (here, “display types”). The example module splits display (static: light, image, video) from live (animated: bar, spinner) this way.