Nested FloatingWindows already supported it, so make it consistent.
Personal take: In a non-docking world, users can override their
main window close event and prevent a close, to save a document
or such. However, in a docking world, the main window developer
won't know which widgets are docked, so forwarding needs to happen,
as some might have documents to save.
TitleBar::isFloating() was returning false, while it should
have returned true.
Fixed by making isFloating() simpler and dumb. isFloating() should
only say if it belongs to a floating window or not. It shouldn't
contain any logic about whether button should be visible or not.
There's already logic elsewhere that will hide the float button
in case there's nesting.
Fixes issue #96 and #44
They now honour Option_MDINestable.
Before they would bail out assuming they weren't in a MDI area.
Now they look further up the hierarchy to find our MDIArea, if any.
Dragging was always detecting the main window's drop indicator
overlay. Make it transparent for mouse events, so that
QWidget::childAt() doesn't pick it, and we can see the inner
drop areas.
Before we didn't need to update it because there was only 1
dock widget. But now, if there's more than one we need to set the
application's name instead of the dock widget's name as title.
Should allow MDI dock widgets to also accept drops.
Befor, each MDI "window" only had 1 dock widget, but now each
MDI "window" a layout of dock widgets.
This is implemented by nesting the actual dock widget inside
a wrapper drop area. This drop area gives the drop support.
There's still bugs and more tests to fix before merging.
This is a public wrapper to MDILayoutWidget. The latter is private
and has internals we don't want to expose. Instead create a public
class with a thin API.
You no longer need to create a MainWindowMDI to have MDI support.
You can now have a normal MainWindow (with normal docking) and
add some dock widget that as a MDIArea as widget.
Tests that we can dock a MDI Layout.
Meaning the main window would support both docking and MDI.
This basic test passes. But there's still a lot of bugs to fix
When we resize the main window then we also resize the inner
dock widgets in the same proportion (based on saved percentages),
during a resize we should not recompute those percentages due to
rounding errors.
They were being recomputed by mistake, since only the root Item
was blocking them, but the function recurses into inner items
Fixes#186
When using MainWindowOption_HasCentralFrame we have a persistent
central frame which is never destroyed. When restoring a layout
we shouldn't create it, as it exists already.