hertzforge.service.report_editor¶
report_editor
¶
Editing a report on the connection's project.
The page is the core's edit page (render_html(edit=True)): every block
tagged with its index, the selected one framed, and a click saying which
block was clicked. The page says so over Qt's web channel, which it was
written for; CHANNEL_JS stands in for that channel and posts the same
message to the shell, which frames the page. Every act (insert, move, delete, a field,
the text, the title and the marking) is on the shell's bar and pane, and each is one
report.operate. Inserting binds the new block to the first object in the project
it can show.
Functions:
| Name | Description |
|---|---|
insert |
A block of |
operate |
One of the editor operations on the report |
pane |
What the shell's pane shows for the selection: the report's own |
editor |
|
Functions:¶
insert
¶
A block of kind inserted at at (the end when None), its sources
bound to the first compatible objects; its index.
operate
¶
One of the editor operations on the report name; the block
selected after it, or None for the report itself.
pane
¶
What the shell's pane shows for the selection: the report's own title and marking with nothing selected, a text block's text, or a figure block's sources and caption, each with the options the pane lists.
editor
¶
editor(project: Any, name: str, selected: int | None, theme: str | None, page: bool = True, units: Any = None) -> dict[str, Any]
report.editor: the edit page with selected framed, the pane for
it, and the labels a text block may reference ({{figure:...}}).
Without page the pane alone, and no labels, since nothing was
rendered: a click on the page frames the block there, so selecting
re-renders nothing.