Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Conversation

@Ashwolaa
Copy link
Contributor

This PR will focus on the possibility to use PatternCompletion in LineEdit and in Table.

In addition to extend the widgets offered by PyMoDAQ, the goal is to provide an automatic completer that can then be conjointed used with the DataMixer. With this approach, it will feel trivial to call the available DataSource.

Here are two examples, added in the parameter_ex:

One is just the application on a PlainText (currently used by the DataMixer)

parameter_pattern.mp4

The other is an improvement of the QTableWidget. It now provides a direct access to Delegates in the initialization. Among those delegates, the pattern_completion is accessible to.

In practice, one could also think of changing the DataMixer to work with a key, value system by using the first column as the name of the variable and the second column with the equation.

parameter_table.mp4

Test / docs / examples will follow

@seb5g
Copy link
Contributor

seb5g commented Oct 23, 2025

for the second example is it build on top of the QTableWidget or the QTableView (with the model/view pattern)?

@seb5g
Copy link
Contributor

seb5g commented Oct 23, 2025

maybe split the PR in two things: autocompletion and other bits. Maybe we should discuss model/view patterns if you're not familiar with it?

@Ashwolaa
Copy link
Contributor Author

for the second example is it build on top of the QTableWidget or the QTableView (with the model/view pattern)?

It is build on QTableWidget, it felt more intuitive and less cumbersome to maintain. But we can try to apply it with the model/view.

maybe split the PR in two things: autocompletion and other bits. Maybe we should discuss model/view patterns if you're not familiar with it?

I agree, it is a bit overwhelming right now. I will push the pattern_completer with the text ptype for now. And yes we can have a chat on the model/view to decide what is best for Table.
My quick research on the web and discussion with AI said that for small non-dynamic tables, it wasn't worth it but you may have a different opinion on it.

@Ashwolaa Ashwolaa marked this pull request as draft October 28, 2025 15:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants