GUI: embedding API for host apps, PNG-default preview#9
Merged
Conversation
Refreshed .gle outputs from running the errorbar/dual-axis/secondary-y-axis example scripts, matching the repo's convention of checking in generated example outputs alongside their source .py scripts. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gleplot.gui.open_editor(path, *, parent, settings, gle_executable)so host applications (e.g. Asymmetry) can embed the editor inside their ownQApplicationwithout touching app-global identity (name/organization/icon) or running an event loop.MainWindow.open_path()andMainWindow.apply_gle_executable()public wrappers for embedders, and letsgleplot-guiaccept an optional.glefile argument on the CLI.<clipPath>clipping, which QtSvg doesn't fully support, causing occluded content to render incorrectly in the SVG preview (the SVG file itself is correct in browsers). The SVG toggle now shows a tooltip and status-bar caveat steering users back to PNG when rendering looks wrong..gleoutputs (errorbar/dual-axis/secondary-y-axis examples) to match current generation.Why
Host apps embedding gleplot's editor need a way to open it inside their own Qt application lifecycle rather than gleplot's GUI owning
QApplicationidentity and the event loop. Separately, the SVG preview path was found to mis-render occluded content due to QtSvg's clip-path limitations, so PNG needed to become the safer default.Test plan
pytest tests/gui/test_app.py -vpytest tests/gui/test_svg_preview.py -vopen_editor()in a hostQApplicationand confirm it opens without clobbering app identity🤖 Generated with Claude Code