HoldAware

Makes an edit surface read-only while an OPAL plan holds its document (opal-plan-edit-sessions §PES-2.3).

Inherits QObject

In the namespace construct::ui. Declared in src/libs/libconstruct/construct/ui/HoldAware.hpp.

Detailed description

A surface that writes the document is bound once, when it is made:

HoldAware::bind(panel, documentContext);

While the document is held the surface is disabled, dimmed by its style, and its tooltip says why; at the release it gets back the enabled state and the tooltip it had. A tab switch re-points the binding with setDocument(). The binding is a child of the surface and dies with it.

The executor refuses a write from a held document's user (§PES-2.1) and logs it as a defect, because a surface that can still send one is unbound. testConstructShellHold walks the shell's edit surfaces and checks each one has a binding (§PES-T6).

In this section