|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
ui::IViewBackend over Qt Quick: each widget is a Qt Quick item made from its kind's MorphUi component, or from the component the restyle map names for that kind. More...
#include <backend.hpp>
Public Member Functions | |
| Backend (QQmlEngine &engine, QQuickItem &host, BackendOptions options={}) | |
A backend whose roots fill host. | |
| ~Backend () override | |
| Removes the roots' column from the host. | |
| Backend (Backend const &)=delete | |
| Backend & | operator= (Backend const &)=delete |
| Backend (Backend &&)=delete | |
| Backend & | operator= (Backend &&)=delete |
| std::unique_ptr< CustomWidget > | createCustom (ui::ContainerWidget *parent, CustomRequest const &request) override |
| Loads a custom component by name. | |
| std::unique_ptr< ui::TextWidget > | createText (ui::ContainerWidget *parent) override |
| Makes read-only text. | |
| std::unique_ptr< ui::ButtonWidget > | createButton (ui::ContainerWidget *parent) override |
| Makes a push button. | |
| std::unique_ptr< ui::TextInputWidget > | createTextInput (ui::ContainerWidget *parent, ui::TextInputMode mode) override |
| Makes a text field. | |
| std::unique_ptr< ui::CheckboxWidget > | createCheckbox (ui::ContainerWidget *parent) override |
| Makes a check box. | |
| std::unique_ptr< ui::SelectWidget > | createSelect (ui::ContainerWidget *parent, ui::SelectStyle style) override |
| Makes a choice of one option. | |
| std::unique_ptr< ui::MenuWidget > | createMenu (ui::ContainerWidget *parent) override |
| Makes a command list. | |
| std::unique_ptr< ui::StackWidget > | createStack (ui::ContainerWidget *parent, ui::Axis axis) override |
| Makes a stack. | |
| std::unique_ptr< ui::GridWidget > | createGrid (ui::ContainerWidget *parent) override |
| Makes a grid. | |
| std::unique_ptr< ui::SpacerWidget > | createSpacer (ui::ContainerWidget *parent) override |
| Makes empty space. | |
| std::unique_ptr< ui::PanelWidget > | createPanel (ui::ContainerWidget *parent) override |
| Makes a titled frame. | |
| std::unique_ptr< ui::ScrollWidget > | createScroll (ui::ContainerWidget *parent, ui::Axis axis) override |
| Makes a scroll area. | |
| std::unique_ptr< ui::SlotWidget > | createSlot (ui::ContainerWidget *parent) override |
| Makes a slot. | |
| std::unique_ptr< ui::TabsWidget > | createTabs (ui::ContainerWidget *parent) override |
| Makes a tab bar. | |
| std::unique_ptr< ui::DialogWidget > | createDialog (ui::ContainerWidget *parent) override |
| Makes a modal overlay. | |
| std::unique_ptr< ui::ToastWidget > | createToast (ui::ContainerWidget *parent) override |
| Makes a transient message. | |
| std::unique_ptr< ui::BusyWidget > | createBusy (ui::ContainerWidget *parent) override |
| Makes a progress indicator. | |
| std::unique_ptr< ui::TableWidget > | createTable (ui::ContainerWidget *parent) override |
| Makes a table. | |
| std::unique_ptr< ui::DateTimeInputWidget > | createDateTimeInput (ui::ContainerWidget *parent, ui::DateMode mode, int offsetMinutes) override |
| Makes a date or date-and-time field. | |
| std::unique_ptr< ui::SliderWidget > | createSlider (ui::ContainerWidget *parent) override |
| Makes a slider. | |
| std::unique_ptr< ui::FilePickerWidget > | createFilePicker (ui::ContainerWidget *parent, ui::FilePickerMode mode) override |
| Makes a file path field. | |
| std::unique_ptr< ui::BannerWidget > | createBanner (ui::ContainerWidget *parent) override |
| Makes a banner. | |
| std::unique_ptr< ui::BadgeWidget > | createBadge (ui::ContainerWidget *parent) override |
| Makes a badge. | |
| std::unique_ptr< ui::ProgressWidget > | createProgress (ui::ContainerWidget *parent) override |
| Makes a progress bar. | |
| std::unique_ptr< ui::StepsWidget > | createSteps (ui::ContainerWidget *parent) override |
| Makes a steps indicator. | |
| std::unique_ptr< ui::KeyValueWidget > | createKeyValue (ui::ContainerWidget *parent) override |
| Makes a key-value list. | |
| std::unique_ptr< ui::EmptyStateWidget > | createEmptyState (ui::ContainerWidget *parent) override |
| Makes an empty state. | |
| std::unique_ptr< ui::DrawerWidget > | createDrawer (ui::ContainerWidget *parent, ui::Side side) override |
| Makes a drawer. | |
| std::unique_ptr< ui::SplitterWidget > | createSplitter (ui::ContainerWidget *parent, ui::Axis axis) override |
| Makes a splitter. | |
| std::unique_ptr< ui::CollapsibleWidget > | createCollapsible (ui::ContainerWidget *parent) override |
| Makes a collapsible section. | |
| std::unique_ptr< ui::DropZoneWidget > | createDropZone (ui::ContainerWidget *parent) override |
| Makes a drop zone. | |
| Public Member Functions inherited from morph::ui::IViewBackend | |
| IViewBackend (IViewBackend const &)=delete | |
| IViewBackend & | operator= (IViewBackend const &)=delete |
| IViewBackend (IViewBackend &&)=delete | |
| IViewBackend & | operator= (IViewBackend &&)=delete |
Static Public Member Functions | |
| static QQuickItem * | itemOf (ui::Widget const &widget) noexcept |
| The Qt Quick item a widget of this backend shows. | |
ui::IViewBackend over Qt Quick: each widget is a Qt Quick item made from its kind's MorphUi component, or from the component the restyle map names for that kind.
Every root a mount makes is appended to a column the backend adds to the host item, so several roots share it top to bottom. Neither copyable nor movable. It belongs to the thread of its engine, and every widget it makes is destroyed before it.
Definition at line 54 of file backend.hpp.
| morph::qt_quick::Backend::Backend | ( | QQmlEngine & | engine, |
| QQuickItem & | host, | ||
| BackendOptions | options = {} ) |
A backend whose roots fill host.
| engine | The engine its components are compiled in. Borrowed. |
| host | The item its roots are shown in. Borrowed. |
| options | The components and the width class callback. |
|
staticnodiscardnoexcept |
The Qt Quick item a widget of this backend shows.
| widget | The widget. |
|
nodiscardoverridevirtual |
Loads a custom component by name.
A host component loads into this backend's engine; a bundle component must match its digest and compiles in the components' contained engine. A component that cannot be loaded — not registered, a host component below minVersion, a digest that does not match, a compile error, a declared prop it lacks — is reported once through the components' failure callback, and the caller shows the fallback.
| parent | The container to append it to; null makes a root. |
| request | The component and the props the document declares. |
Reimplemented from morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes read-only text.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a push button.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a text field.
| parent | The container to append to, or null for a root. |
| mode | Single-line, multiline or password. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a check box.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a choice of one option.
| parent | The container to append to, or null for a root. |
| style | Dropdown or radio. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a command list.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a stack.
| parent | The container to append to, or null for a root. |
| axis | Vertical (a column) or horizontal (a row). |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a grid.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes empty space.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a titled frame.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a scroll area.
| parent | The container to append to, or null for a root. |
| axis | The scroll direction. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a slot.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a tab bar.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a modal overlay.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a transient message.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a progress indicator.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a table.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a date or date-and-time field.
| parent | The container to append to, or null for a root. |
| mode | Date, or date and time. |
| offsetMinutes | The display zone's offset from UTC. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a slider.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a file path field.
| parent | The container to append to, or null for a root. |
| mode | Open or save. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a banner.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a badge.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a progress bar.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a steps indicator.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a key-value list.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes an empty state.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a drawer.
| parent | The container to append to, or null for a root. |
| side | The edge it slides in from. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a splitter.
| parent | The container to append to, or null for a root. |
| axis | The axis its panes are laid out along. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a collapsible section.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.
|
nodiscardoverridevirtual |
Makes a drop zone.
| parent | The container to append to, or null for a root. |
Implements morph::ui::IViewBackend.