I have looked into how we could implement the detach behavior of MDI Items. I successfully added a "detach" button, that does exactly that.
However, I could not resolve the ownership of the MDI Items and their widgets. And every solution feels hacky. I think we'll have to wait for #1199. I really would like to have this implemented, but I'll could not get this to work in the few hours I have spent and I dont want to spent anymore time on this for now. If anybody else is interested, go for it. Still, I wanted to save the little progress I have made.
Another issue I have faced is how we allow the widget to "redock" with the main area. Maybe a drag-and-drop system might work? But this might be difficult to implement. Since it's not easily possible to add a button to the window-bar we might have to implement our own window-bar like with the dock widgets. Or we might be able to intercept the "minimize/close" event (when the user minimizes/closes the window) to reattach it to the dock area.
Before undocking (notice the fancy button)
After widget was undocked it became its standalone window (how do we "redock" it?)
Closes #604
How Has This Been Tested?
Manually
Checklist:
[ ] A test for the new functionality was added (if applicable).
[ ] All tests run without failure.
[ ] The changelog has been extended, if this MR contains important changes from the users's point of view.
[ ] The new code complies with the GTlab's style guide.
[ ] New interface methods / functions are exported via EXPORT. Non-interface functions are NOT exported.
[ ] The number of code quality warnings is not increasing.
Description
I have looked into how we could implement the detach behavior of MDI Items. I successfully added a "detach" button, that does exactly that.
However, I could not resolve the ownership of the MDI Items and their widgets. And every solution feels hacky. I think we'll have to wait for #1199. I really would like to have this implemented, but I'll could not get this to work in the few hours I have spent and I dont want to spent anymore time on this for now. If anybody else is interested, go for it. Still, I wanted to save the little progress I have made.
Another issue I have faced is how we allow the widget to "redock" with the main area. Maybe a drag-and-drop system might work? But this might be difficult to implement. Since it's not easily possible to add a button to the window-bar we might have to implement our own window-bar like with the dock widgets. Or we might be able to intercept the "minimize/close" event (when the user minimizes/closes the window) to reattach it to the dock area.
Before undocking (notice the fancy button)
After widget was undocked it became its standalone window (how do we "redock" it?)
Closes #604
How Has This Been Tested?
Manually
Checklist:
EXPORT
. Non-interface functions are NOT exported.