Fluent-Qt

API reference

EditingCommandRouter

Provides window-scoped semantic actions for the focused Fluent editor.

fluent::textfields::EditingCommandRouter

Inherits QObject

Constructors

explicit EditingCommandRouter(QWidget* scopeWindow, QObject* parent = nullptr)

Creates a router scoped to the top-level window containing scopeWindow.

Methods

QWidget* scopeWindow() const

Returns the top-level window that owns this command scope.

bool hasActiveTarget() const

Returns whether a supported Fluent editor is the active target.

QAction* action(Command command) const

Returns the router-owned action for command.

QList<QAction*> actions() const

Returns all actions in semantic command order.

bool canExecute(Command command) const

Returns whether command can execute against the current target.

bool execute(Command command)

Revalidates and executes command against the active target.

void refresh()

Recomputes active command capabilities without changing focus.

Signals

void activeTargetChanged(bool hasActiveTarget)

Emitted when the active supported target changes.

Enumerations

enum class Command

Editing commands exposed through stable QAction instances.

  • Undo
  • Redo
  • Cut
  • Copy
  • Paste
  • Delete
  • SelectAll

Destructors

All inherited Qt members:QObject