Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ability for a user of a UI to add one or more custom UI panels #119

Open
joco-nz opened this issue May 4, 2023 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@joco-nz
Copy link
Contributor

joco-nz commented May 4, 2023

Similar to the feature available in pyvcp UI designer could allow for the ability to add/insert in a user designed/define UI panel.

Concept:
This would be a UI file/python handler mix that could be dynamically loaded on UI start and added to some specified part of the master UI. The easiest example is a TabWidget gets a new tab holding this user loaded UI.

The specification for where this is loaded could be via custom config yaml file in the machines config dir or it could be (as pyvcp does) entries in the ini file.

Pyvcp allows for flexibility to embed more than just QT UI's. I am not sure that is necessary or desirable. Especially from a support angle. But perhaps worth considering.

@joco-nz joco-nz added the enhancement New feature or request label May 4, 2023
@KurtJacobson
Copy link
Member

I did some work on support for embedded UIs, that might be adaptable for this purpose: main...embeded_ui

As it stands, it should be possible to insert a custom UI anywhere in the VCP by pointing the mainwindow:provider in the YAML to a custom python file in the machine config dir, that inherits the original VCPs VCPMainWIndow class. In this class, load the original UI file, get a reference to the widget to embed in, and add the embedded UI as a child. I did have an example of this approach, will see if I can find it.

Would be excellent to have these methods documented, or better yet, a more streamlined method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants