-
Notifications
You must be signed in to change notification settings - Fork 14
Feature/Pattern_Completion and TableWidget #105
base: 5.0.x_dev
Are you sure you want to change the base?
Conversation
|
for the second example is it build on top of the QTableWidget or the QTableView (with the model/view pattern)? |
|
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? |
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.
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. |
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