morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::qt_quick::FrontendConfig Struct Reference

What a qt_quick::Frontend runs with. More...

#include <frontend.hpp>

Public Attributes

ShellFactory mountShell
 Mounts the shell when the source is ready; it must not be empty.
Components * components = nullptr
 The restyle map and the custom components the backend uses; null uses none. Borrowed: it outlives the run.
std::string title = "morph"
 The window's title.
std::function< void(std::string const &widthClass)> onWidthClass
 Called with the window's width class (widthClassOf) when the window first has a width and each time the class changes; empty calls nothing. The shell sets it as {"env": "widthClass"}.
ui::DevelopmentTools devTools = ui::DevelopmentTools::Off
 Development mode (spec 6 §21): with On, Ctrl+Shift+I in the window opens the inspector over the screen the shell shows (ui::MountedShell::inspectFocused). With Off, the key does nothing.
std::function< void(QQmlEngine &engine, QQuickWindow &window)> onEngine
 Called once per run with the engine and the window, after both exist and before the backend is built: where an application registers its QML modules, maps its restyles and applies its own theme. Empty calls nothing. When it throws, run tears down what it made and rethrows; nothing is mounted.
BundleTheme bundleTheme = BundleTheme::Apply
 Whether the bundle's theme is applied when the source opens. With Apply, a theme onEngine set that the bundle's then replaces is reported once on std::cerr.

Detailed Description

What a qt_quick::Frontend runs with.

Definition at line 42 of file frontend.hpp.

Member Data Documentation

◆ mountShell

ShellFactory morph::qt_quick::FrontendConfig::mountShell

Mounts the shell when the source is ready; it must not be empty.

Definition at line 44 of file frontend.hpp.

◆ components

Components* morph::qt_quick::FrontendConfig::components = nullptr

The restyle map and the custom components the backend uses; null uses none. Borrowed: it outlives the run.

Definition at line 47 of file frontend.hpp.

◆ title

std::string morph::qt_quick::FrontendConfig::title = "morph"

The window's title.

Definition at line 49 of file frontend.hpp.

◆ onWidthClass

std::function<void(std::string const& widthClass)> morph::qt_quick::FrontendConfig::onWidthClass

Called with the window's width class (widthClassOf) when the window first has a width and each time the class changes; empty calls nothing. The shell sets it as {"env": "widthClass"}.

Definition at line 52 of file frontend.hpp.

◆ devTools

ui::DevelopmentTools morph::qt_quick::FrontendConfig::devTools = ui::DevelopmentTools::Off

Development mode (spec 6 §21): with On, Ctrl+Shift+I in the window opens the inspector over the screen the shell shows (ui::MountedShell::inspectFocused). With Off, the key does nothing.

Definition at line 55 of file frontend.hpp.

◆ onEngine

std::function<void(QQmlEngine& engine, QQuickWindow& window)> morph::qt_quick::FrontendConfig::onEngine

Called once per run with the engine and the window, after both exist and before the backend is built: where an application registers its QML modules, maps its restyles and applies its own theme. Empty calls nothing. When it throws, run tears down what it made and rethrows; nothing is mounted.

Definition at line 59 of file frontend.hpp.

◆ bundleTheme

BundleTheme morph::qt_quick::FrontendConfig::bundleTheme = BundleTheme::Apply

Whether the bundle's theme is applied when the source opens. With Apply, a theme onEngine set that the bundle's then replaces is reported once on std::cerr.

Definition at line 62 of file frontend.hpp.


The documentation for this struct was generated from the following file: