Files
leocad/docs/dialog-help.md
T
Leonardo Zide 554c1d28a7 Add contextual help to Array and Save Image dialogs
Explain array counts, offsets, rotations, image dimensions, file naming,
and step ranges with translated tooltips and contextual help. Give both
dialogs a standard Help button and dialog-scoped F1 support that falls back
from the focused control through its parent groups to the overview.

Link image field labels to their buddies and share tooltip and field help
text. Add accessible names for unlabeled controls. Document the writing and
maintenance conventions, with concise guidance in the existing AGENTS.md.

Refresh all eight language catalogs while preserving existing translations
and review status. The 62 new help and accessibility strings remain
unfinished pending translation.

Validation: Qt 6.10 debug build; runtime checks for seven F1 routes, Help,
Escape, dialog state, spin-box focus, and five label buddies with matching
help; visual layout inspection; catalog coverage for all 2,118 active source
messages and existing translation preservation; git diff --check.
2026-10-22 15:14:11 -07:00

2.2 KiB

Dialog tooltips and contextual help

Tooltips explain a control in one short sentence. Use sentence case, US English, and a final period. State units where relevant. Explain the action or effect instead of repeating the label. Standard OK and Cancel buttons need no tooltip.

Use whatsThis for longer explanations: what a setting changes, dependencies, ranges, and a small example when useful. A dialog overview explains its purpose and workflow; group help explains related fields. Verify behavior in the code before documenting defaults, units, or limits. Keep essential instructions visible in the dialog rather than available only on hover.

Keep static help in the dialog's .ui file so Qt extracts it for translation. Use translated C++ strings for dynamic help. Do not translate static data before application translators are installed. New catalog entries remain unfinished until reviewed, following the existing translation policy. Refresh affected catalogs after changing UI strings, preserving existing translations and review status. Maintain resources/leocad_en.ts with lupdate -pluralonly. Keep the current build policy of including nonempty unfinished translations.

Add the standard Help button to the dialog's button box, then call lcSetupDialogHelp() after setupUi(). Help shows the dialog overview. F1 shows help for the focused control, falling back through its parent groups to the dialog overview. This also handles focus inside composite controls such as spin boxes. Both entry points use Qt's native What's This popup.

Give unlabeled controls meaningful accessible names. Check Help, F1, and Escape with keyboard navigation, as well as tooltip placement and longer translated help. The initial examples are Array and Save Image.

Link field labels to their controls using Qt buddies. Buddies provide focus and accessibility relationships, but do not share tooltips or contextual help. Keep help on the control and copy its tooltip to the label in the .ui file. Also copy field-specific whatsThis text when the label would otherwise fall back to a different section or dialog overview. Identical text in the same translation context shares a catalog entry. Update both properties together when the help changes.