feat(dialog): add default_suffix to the save-file picker#138
Open
pabloinigoblasco wants to merge 2 commits into
Open
feat(dialog): add default_suffix to the save-file picker#138pabloinigoblasco wants to merge 2 commits into
pabloinigoblasco wants to merge 2 commits into
Conversation
Add WidgetData::setSaveFilePicker and the matching WidgetDataView accessors so a plugin can turn a button into a native "save as" chooser. The chosen path is delivered through the existing onFileSelected handler, so no new event type or typed handler is required. This is a backward-compatible API addition, so bump the SDK to 0.13.0 and bring recipe.yaml back in sync with the other version sources. Contents: - setSaveFilePicker(name, text, filter, title, default_suffix) -> "save_file_picker" action - WidgetDataView: isSaveFilePicker / saveFilePickerFilter / Title / DefaultSuffix - version 0.13.0 in conanfile.py, CMakeLists.txt, recipe.yaml + docstring example - docs: dialog-sdk-reference.md and dialog-plugin-guide.md
The save-file picker now lives on top of the markers/data-processors unification branch. setSaveFilePicker / isSaveFilePicker are taken from that branch; this branch's only remaining contribution is the optional default_suffix argument (and its saveFilePickerDefaultSuffix accessor), appended to the typed name when it carries no extension. Filter/title are read through the shared filePicker accessors, matching that branch's style.
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
Builds on
PlotJuggler/plotjuggler_sdk#135(which introduces the save-file picker as part of thepj.data_processors.v1unification) and adds the optionaldefault_suffixargument tosetSaveFilePicker— appended to the typed filename when it carries no extension (so exportinglibrarysaveslibrary.json).Targeted at
feature/plot-markersso the two merge cleanly: the picker's setter andisSaveFilePickerare identical to #135's; this branch's only delta isdefault_suffixplus itssaveFilePickerDefaultSuffixaccessor. Filter/title are read through the sharedfilePicker*accessors, matching #135's style.Contents
WidgetData::setSaveFilePickergainsdefault_suffix = ""(writese["default_suffix"]).WidgetDataView::saveFilePickerDefaultSuffix.dialog-sdk-reference.md,dialog-plugin-guide.md.Pairs with
The host rendering (
PlotJuggler/PJ4#252) and the Transform Editor library Export that uses it (PlotJuggler/pj-official-plugins#158).