Sergio Martins
bbbce6f694
qtquick: Fix close() not hidding the widget
...
QtQuick will emit a "visibleChanged(true)" when setting nullptr,
which we need to inhibit so it behaves like QtWidgets.
2021-05-02 11:22:26 +01:00
Sergio Martins
d5b2336b69
refactoring: Move the dockWidgetFactoryFunc() call
...
It's now an impl-detail of DockRegistry::dockByName().
Just pass DockByNameFlag::CreateIfNotFound.
Allows this functionality to be used in other places
2021-04-29 21:29:58 +01:00
Sergio Martins
3f012a2ef1
Remove a bogus setWindowTitle()
...
Setting a widget would change the top-level window title!
By luck people set the widget before docking, but doesn't have
to be that way.
2021-04-29 16:23:22 +01:00
Sergio Martins
83c744041e
Merge branch '1.3'
2021-04-27 23:52:17 +01:00
Sergio Martins
c4d3ba71b2
Fix crash due to MainWindow not clearing m_overlayedDockWidget
...
When we close the overlayed widget we need to clear this variable
Added 1 real fix and a prophylactic check too.
2021-04-27 23:49:26 +01:00
Sergio Martins
aa76dfba02
LayoutSaver: Support the user's factory func doing remapping
...
While restoring a layout, we expect all widgets to exist already,
but we allow the user to create them delayed, by providing
us a factory function.
What we're supporting in this commit is the ability of the user's
factory function returning a dock widget with an ID different
than the one that was requested. We then save that mapping so the
rest of the layout restore works with the new ID.
2021-04-23 14:55:01 +01:00
Sergio Martins
95317a7336
Add signal DockWidget::aboutToDeleteOnClose()
...
It's emitted when the dock widget is going about deleted due to
the DeleteOnClose functionality
2021-04-14 15:24:15 +01:00
Allen Winter
75c7744e59
move the class private header up in the include order
2021-03-23 08:36:24 -04:00
Sergio Martins
e3b333aca8
Make DockWidget::raise() raise the frame in MDI mode
2021-03-18 15:08:54 +00:00
Sergio Martins
447b4337dd
Add DockWidget::frameGeometry()
2021-03-09 17:55:36 +00:00
Sergio Martins
633daf124e
Fix some warnings about shadowing methods
2021-03-09 15:43:36 +00:00
Sergio Martins
446560931b
MDI: Fix docked widget geometries not being remembered when floating
...
We shouldn't move the Frame directly. Instead, do it through the
layout, which will then remember the last docked geometry
2021-03-07 16:56:37 +00:00
Sergio Martins
2f212031b3
qtquick|MDI: Don't set a size smaller than its min
2021-03-03 17:03:06 +00:00
Sergio Martins
4d428d42f6
Added DockWidgetBase::setMDIZ(int z)
...
Sets the Z order of the dockwidget within the MDI layout
2021-03-02 10:43:07 +00:00
Sergio Martins
cf0665c9b6
Added DockWidgetBase::setMDISize()
...
Only for dock widgets in MDI layout, where they are freely resizable
2021-03-02 10:21:29 +00:00
Sergio Martins
93c011c69d
Added DockWidgetBase::setMDIPosition(QPoint pos)
...
Moves the window within the layout.
Only applies to MDI layouts.
2021-03-01 23:41:53 +00:00
Sergio Martins
d01228d9ff
Fixes cases where actualTitleBarChanged() wasn't emitted
2021-03-01 23:02:56 +00:00
Sergio Martins
1614d5702c
Allow to call DockWidget::setWidget(nullptr)
...
In case you need to change ownership
2021-03-01 19:56:46 +00:00
Sergio Martins
15e63381a9
Added DockWidgetBase::setUserType(int)
...
This is an opaque value which KDDW won't try to interpret or do
anything with it other than forward it to the FrameworkWidgetFactory.
Which if specialized by the user he can have different title bars
for different said "dock widget types"
2021-02-28 18:57:35 +00:00
Sergio Martins
ff67b9bcbc
Merge branch '1.3' into master
2021-02-26 15:20:32 +00:00
Sergio Martins
610b85d01a
Minor readability improv: replace bool with enum
...
CC issue #174
2021-02-26 14:32:55 +00:00
Sergio Martins
3bcfcc40c0
Minor decoupling between DropArea and DockWidgetBase
2021-02-09 16:23:49 +00:00
Sergio Martins
e3b0feb967
DockWidgetBase.cpp uses MultiSplitter's base class now
2021-02-09 15:54:47 +00:00
Sergio Martins
51dc666181
Added DockWidget::setFloatingGeometry()
...
Closes #144
2021-02-07 17:26:01 +00:00
Allen Winter
a421cb0b01
various - include private header first, remove header dupes
2021-02-07 07:07:49 -05:00
Sergio Martins
44bf1ef322
qtquick: Move dummy QAction class into the pimpl header
...
No need for it to be in the public header
2021-02-06 18:20:44 +00:00
Sergio Martins
863691c313
Remove some private API from DockWidgetBase.h
...
Moved it into the pimpl
2021-02-06 16:32:13 +00:00
Sergio Martins
38443048b8
Merge branch '1.2'
2021-02-05 16:42:07 +00:00
Sergio Martins
621c3dbeca
Also clear the overlay internals when floating an overlay
...
Fixes a crash.
Relates to #162
2021-02-05 16:32:41 +00:00
Sergio Martins
249d1b6790
Remove from the sidebar when floating a widget
...
Fixes #162
2021-02-05 12:35:03 +00:00
Sergio Martins
6ccd98ca01
Move DockWidgetBase::eventFilter() into the private class
...
Fixes issue #151 where the user is overriding eventFilter too
and getting into some edge cases.
Could be worked around in user code, but it's always good to have
less protected and private API in public classes.
2021-01-29 20:20:01 +00:00
Sergio Martins
b50d301f44
Add DockWidget::tabIndex()
2021-01-29 18:32:10 +00:00
Sergio Martins
ee759a5459
Don't trigger "Delete on Close" when sending to the sidebar
2021-01-28 22:40:41 +00:00
Sergio Martins
e9d19805d7
Add a force close to DockWidgetBase::Private
...
So we can add an argument there, without changing public API
2021-01-28 22:19:21 +00:00
Sergio Martins
bc1e686455
Create DockWidgetBase_p.h and move the pimpl there
...
So we can reuse the pimpl and not have to expose public API
for implementation details
2021-01-28 21:44:12 +00:00
Sergio Martins
db06c496cf
Remove dependencies to LayoutSaver_p.h
...
Only the impl needs to include it
2021-01-27 22:51:41 +00:00
Sergio Martins
17638bc29f
Fix regression with DockWidget::toggleAction()
...
Added unit-test too.
While we're processing the toggle action triggering isOpen() is
always false.
2021-01-21 16:16:29 +00:00
Sergio Martins
40a549ca29
Fix double delete screwing with lastPositions()
...
Fixes #141
2021-01-18 23:37:17 +00:00
Sergio Martins
44587cb947
Don't require LayoutSaver_p.h to be installed
...
It's impl detail that doesn't need to be installed
2021-01-18 20:37:22 +00:00
Sergio Martins
e6bdb28484
Added convenience DockWidgetBase::skipsRestore()
2021-01-15 20:17:45 +00:00
Sergio Martins
c52446f3b0
Merge branch '1.2'
2021-01-15 09:27:17 +00:00
Sergio Martins
9cadfb26d9
Fix toggleAction() when dock widget is in the sidebar
...
It should toggle the overlay, not dock the widget
Fixes #139
2021-01-15 09:24:11 +00:00
Sergio Martins
8dd7a90b34
Add convenience DockWidgetBase::isInSideBar()
2021-01-15 08:52:17 +00:00
Sergio Martins
7ddb95a417
Add a single TitleBar::updateButtons()
...
updateCloseButton() can now be private
2021-01-13 23:07:49 +00:00
Sergio Martins
8f61e57b57
Add DockWidget::Option::Option_DeleteOnClose
2021-01-13 12:54:18 +00:00
Sergio Martins
e0e6f55868
Introduce DockWidgetBase::LayoutSaverOptions enum
...
The first enumerator is "Skip", meaning the dock widget won't
be affected by save/restore. It won't disappear while restoring,
and won't be shown if already hidden. (only applies to floating widgets)
2021-01-11 23:33:32 +00:00
Sergio Martins
36eef80192
Also pass InitialOption to addDockWidgetToContainingWindow()
...
So you can control initial size and such
2021-01-09 13:58:56 +00:00
Sergio Martins
306bf26f66
Remove some qCDebug I never needed
2021-01-09 13:27:30 +00:00
Sergio Martins
e07fb7f121
DockWidget::addDockWidgetToContainingWindow() now accepts docking to main window
...
Was already stated in the docs that it would work with a main window but implementation
only allowed floating window.
Fixes #132
2021-01-09 13:24:06 +00:00
Sergio Martins
c73c26e5cb
tests: Fix overloaded signal "parentChanged()"
2021-01-08 18:24:51 +00:00