Skip to content

Use ListModels#553

Merged
leolost2605 merged 4 commits intomainfrom
leolost/list-models
Apr 7, 2026
Merged

Use ListModels#553
leolost2605 merged 4 commits intomainfrom
leolost/list-models

Conversation

@leolost2605
Copy link
Copy Markdown
Member

@leolost2605 leolost2605 commented Dec 26, 2025

This builds on top of #523 and allows us to provide a listmodel of objects and bind them to the itemgroup similar to how we bind listmodels to listboxes.

This has a few advantages:

  • remove most of the mess in itemmanager (lots of type checking, custom layouting, work arounds)
  • simplify the item handling. For example on main when a workspace is removed the workspace system receives that signal -> removes it from its internal list -> calls remove() on the workspace -> that emits the removed signal on the workspace -> the workspace icon group is connected to that and emits removed() on the baseitem -> the itemmanager had connected to that and starts removing the item. That involves 5 classes. With this branch it goes workspace system receives that signal -> removes the workspace from its internal list which is now a listmodel -> the rest is handled automatically via the items changed signal of the listmodel in the item group. That involves 2 classes.
  • allows to add new sections to the dock much more easily

@leolost2605 leolost2605 force-pushed the leolost/list-models branch 2 times, most recently from 0af8628 to 0323d9d Compare December 29, 2025 12:28
@leolost2605 leolost2605 marked this pull request as ready for review December 30, 2025 13:22
@leolost2605
Copy link
Copy Markdown
Member Author

This should be ready for review now. You can look at the individual commits for easier review. The first one is the same as #523.

Copy link
Copy Markdown
Contributor

@zeebok zeebok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Let me know if I need to re-review anything after fixing conflicts

@leolost2605 leolost2605 force-pushed the leolost/list-models branch from 0323d9d to aac5bee Compare April 7, 2026 17:12
@leolost2605 leolost2605 force-pushed the leolost/list-models branch from aac5bee to e7eb6ed Compare April 7, 2026 17:23
@leolost2605 leolost2605 merged commit c28bb23 into main Apr 7, 2026
4 checks passed
@leolost2605 leolost2605 deleted the leolost/list-models branch April 7, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants