Fluent-Qt

API reference

FormController

Coordinates borrowed Fields without owning values, validators, or requests.

fluent::FormController

Inherits QObject

Constructors

Properties

bool dirty
Read isDirty()Notify stateChanged()
bool touched
Read isTouched()Notify stateChanged()
bool validating
Read isValidating()Notify stateChanged()
bool submitting
Read isSubmitting()Notify stateChanged()
bool valid
Read isValid()Notify stateChanged()
QStringList errorMessages
Read errorMessages()Notify stateChanged()
QString submissionError
Read submissionError()Notify stateChanged()

Methods

bool addField(const QString& key, layout::Field* field)

Registers a unique, borrowed Field; neither it nor its editor is reparented.

void markFieldChanged(const QString& key)

Marks an edit and invalidates in-flight validation and submission tokens.

void markClean()

Marks current values clean without writing editors.

void reset()

Clears coordination state, not editor values.

quint64 validateField(const QString& key)

Requests validation; no connected validator leaves the request pending.

bool completeValidation(const QString& key, quint64 token, bool valid, const QString& message = QString())

Accepts only the current token; an empty success message restores helper text.

bool submit()

Validates all fields, then emits submitRequested once; duplicate submits are rejected.

bool completeSubmit(quint64 token, bool success, const QString& message = QString())

Completes the current submission; success marks values clean, failure keeps edits.

bool focusFirstError()

Focuses the first registered invalid editor.

Signals

Destructors

All inherited Qt members:QObject