fontlabapp.anchors.panel.ui.AnchorPanel
AnchorPanel
Non-modal panel: script controls, live preview table, Reload, Close, Apply.
What: a subclass sets TITLE, KEY, ACTION (the Apply button
text) and HEADERS (3 or 4 columns), and fills in build_controls
and planner. Optional hooks: chosen_masters, glyph_names and
on_reload. Helpers for subclasses: watch, spin, scope_box.
How: every control change recomputes the plan from the live font and
shows exactly what Apply would write. Apply stays off while any row is
blocked or require_safe refuses. Apply binds to the font, master and
glyphs of the last scan, plans again, scans the auto-layer facts again and
writes once through anchor_writer.apply_work.
Why: the preview can never be stale at Apply, and an exception in a slot
stays in the status line instead of reaching FontLab. Show it with
scripting.show_script_dialog(Subclass, Subclass.KEY).
Source bases
QtGui.QDialog(not resolved from selected source)
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
ACTION |
attribute | (shared captured text) | |
HEADERS |
attribute | tuple[str, ...] |
|
KEY |
attribute | ||
TITLE |
attribute | ||
WIDTH |
attribute | ||
__init__ |
function | (self, parent: Any=None) -> None |
Build every widget, then scan the font. |
apply |
function | (self) -> None |
Plan again from live data, check safety again and write once. |
build |
function | (self) -> None |
Create every widget before any font data is read. |
build_controls |
function | (self) -> None |
Subclass hook: add widgets to <code>self.form</code><code> and </code><code>self.watch()</code> their signals. |
cells |
function | (self, label: str, change: anchor_writer.Change) -> list[str] |
Return the row texts: 3 columns (glyph, anchor, result) or 4 (with current). |
chosen_masters |
function | (self) -> list[str] |
Return the masters to plan. |
closeEvent |
function | (self, event: Any) -> None |
Stop the timers, disconnect every signal, unregister and delete the panel. |
fill |
function | (self, plan: anchor_writer.Plan) -> None |
Show the first <code>MAX_ROWS</code> rows of the plan. |
glyph_names |
function | (self) -> list[str] |
Return the glyphs to work on: the Font window selection, or the current glyph. |
intro |
function | (self) -> str |
Return the subtitle: the glyph names, or what is missing. |
on_reload |
function | (self) -> None |
Subclass hook: refresh control contents that depend on the font. |
planner |
function | (self) -> anchor_writer.Planner |
Subclass hook: return the per-layer planner. |
read_font |
function | (self) -> None |
Bind to the current font, its masters and its current master. |
refresh |
function | (self) -> None |
Plan again, fill the table and enable Apply only when the plan is safe. |
relabel |
function | (self) -> None |
Keep the scope combo texts in step with the font and its masters. |
reload |
function | (self) -> None |
Scan again. |
scan |
function | (self) -> None |
Read the font, the selection and the auto-composite facts again. |
scope_box |
function | (self) -> Any |
Return a combo box: 0 is the current master, 1 is all masters. |
spin |
function | (self, low: int, high: int, value: int, suffix: str='') -> Any |
Return a right-aligned integer <code>QSpinBox</code> with readable text. |
watch |
function | (self, signal: Any, callback: Callable[..., Any] | None=None) -> None |
Connect <code>signal</code><code> through the guard; the default callback is </code><code>refresh</code>. |