Fluent-Qt

API reference

QMLPlus

Mixin that adds anchors, property binding, and simple states to QWidget-based components.

fluent::AnchorLayout

Inherits QLayout

Lightweight anchor-based layout for QWidget controls.

Constructors

Methods

Anchors anchorsForWidget(QWidget* widget) const

Returns the current anchors for a registered widget.

bool setWidgetAnchors(QWidget* widget, const Anchors& anchors)

Replaces a registered widget's anchors and invalidates the layout.

Enumerations

enum class Edge

Anchorable edge or center line.

  • None
  • Left
  • Right
  • Top
  • Bottom
  • HCenter
  • VCenter

Types and aliases

struct Anchor

One anchor relation from an edge to a target widget edge.

struct Anchors

Complete anchor set for one child widget.

Destructors

All inherited Qt members:QLayout

fluent::AnchorLayout::Anchor

One anchor relation from an edge to a target widget edge.

Constructors

Fields

fluent::AnchorLayout::Anchors

Complete anchor set for one child widget.

Constructors

Fields

fluent::BindingDependency

Explicit observable input to a computed binding or state condition.

Fields

fluent::BindingOptions

Initial enablement and optional event-loop coalescing for a binding.

Fields

fluent::BindingHandle

Copyable, non-owning control for a target-owned property binding.

Constructors

Methods

bool isValid() const

Reports whether the binding and its endpoints remain available.

bool isEnabled() const

Returns enablement independently of manual or state suspension.

bool isSuspended() const

Reports manual pause or an active state override.

void setEnabled(bool enabled) const

Enables or disables synchronization; enabling refreshes immediately.

void pause() const

Holds the current displayed value while preserving enablement.

void resume() const

Removes manual pause and refreshes an enabled, uncovered binding.

void refresh() const

Evaluates an active binding immediately, bypassing deferred scheduling.

void unbind() const

Permanently removes the binding and holds its current displayed value.

fluent::PropertyBinder

Managed property synchronization through Qt meta-properties and NOTIFY.

Methods

Enumerations

enum Direction

Binding direction.

  • OneWay
  • TwoWay

fluent::PropertyChange

Property assignment applied by a QMLPlus state.

Fields

fluent::AnchorChange

Complete replacement anchor set applied and restored by a state.

Fields

fluent::QMLState

Named set of property changes.

Fields

fluent::PropertyAnimation

MotionPolicy-aware animation for managed property writes.

Fields

fluent::StateTransition

Animation selected for matching state changes; empty properties match all.

Fields

fluent::QMLPlusRuntime

Inherits QObject

Lazy QObject-host-owned observation surface for QMLPlus state transitions.

Properties

QString state

Returns the logical destination state, before animation completion.

Read state()Notify stateChanged()
bool transitionRunning

Reports whether managed state transition animations are running.

Read isTransitionRunning()Notify transitionRunningChanged()

Methods

QString state() const

Returns the logical destination state, before animation completion.

bool isTransitionRunning() const

Reports whether managed state transition animations are running.

Signals

void stateChanged(const QString& state)

Returns the logical destination state, before animation completion.

void transitionRunningChanged(bool running)

Reports whether managed state transition animations are running.

Destructors

All inherited Qt members:QObject

fluent::QMLPlus

Constructors

Methods

AnchorLayout::Anchors* anchors()

Returns mutable anchors for the QWidget host.

void setState(const QString& name)

Applies a named state, or clears state when name is empty.

void addState(const QMLState& state)

Registers or replaces a named state definition.

void evaluateStates()

Reevaluates conditions; the first registered true condition wins.

QMLPlusRuntime* runtime()

Returns the lazy host-owned state observation object.

void setAnchors(const AnchorLayout::Anchors& anchors)

Replaces all host anchors and invalidates the parent layout.

void resetAnchors()

Clears all host anchors and invalidates the parent layout.

void addTransition(const StateTransition& transition)

Registers a state transition in precedence order.

void setBehavior(const char* propertyName, const PropertyAnimation& animation)

Sets the default animation for this host's managed property writes.

void clearBehavior(const char* propertyName)

Removes the default animation for future managed writes.

bool writeProperty(const char* propertyName, const QVariant& value)

Writes a host property through Behavior without removing its binding.

Destructors

Subclass interfaces

Methods