VivoQuant 6.5.0
Loading...
Searching...
No Matches
ContainerNode Class Reference

Description

A node that arranges child nodes in a Grid. Its named descendants, through any nested layout containers, share one name scope.

Public Member Functions

QWidget * widget () override
 The widget placed in the parent's grid, and the label beside it (null: no label cell).
Node * appendChild (VariantMap &spec)
 Appends a child built from spec, which must already be validated.
bool removeNamed (string name)
 Removes the named node anywhere in this scope. Returns false if not found.
Node * findNamed (string name)
 The named node anywhere in this scope (not inside data containers), or null.
QVector< Node * > valueNodes ()
 Value nodes in this scope, in display order.
Array< string > scopeNames ()
 All names used in this scope.
QJsonObject describe () override
 Adds columns and entries (see describeChildren()).
QJsonArray describeChildren ()
 describe() of each child, in display order, with its row, col and span.
Public Member Functions inherited from Node
int span ()
 Columns taken in the parent's grid.
virtual bool hasValue ()
 Fields and data containers have a value; layout containers don't.
void setValue (Variant &value)
 Sets the value; value must already be validated with validateValue().
virtual ContainerNode * asLayoutContainer ()
 A layout container, whose named descendants share this node's scope.
void setObjectNames (string prefix)
void finishSetup ()
 Applies tooltip and read-only from the spec; called once after construction.

Protected Member Functions

void initGrid (QBoxLayout *parent, int index, int stretch)
 Creates the grid in parent; subclasses call this once their widgets exist.
Protected Member Functions inherited from Node
void applyReadOnly (bool readOnly)
 Updates widgets for the effective read-only state.
QObject * context ()
 Context object for signal connections: destroyed with the node, which disconnects them.