Sergio Martins
429bcfc4e0
Rename Frame.qml to Group.qml
2022-06-23 16:03:46 +01:00
Sergio Martins
ae5cf1d723
More renaming of "frame" to "group"
2022-06-23 16:01:43 +01:00
Waqar Ahmed
4ba58ac1be
Add DockWidget::aboutToDelete
...
Relying on QObject::destroyed might not be a good idea, fixes the
following ASAN issue:
```
SideBar.cpp:80:22: runtime error: downcast of address 0x6040005c8b90
which does not point to an object of type 'DockWidget'
0x6040005c8b90: note: object is of type 'QObject'
00 00 00 00 88 64 e7 43 3f 7f 00 00 a0 ff 0e 00 80 60 00 00
70 81 0c 00 c0 60 00 00 01 be be be
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'QObject'
```
2022-06-22 19:16:56 +05:00
Sergio Martins
cc918c5195
More "frame" to "group" renaming
2022-06-22 13:42:22 +01:00
Sergio Martins
bc767cefac
Rename asFrameController to asGroupController
2022-06-21 17:32:38 +01:00
Sergio Martins
0aec6dfdb1
Rename more frame variables to group
2022-06-21 17:31:28 +01:00
Sergio Martins
9469273c7a
Rename "frame" variables to "group"
2022-06-21 17:12:11 +01:00
Sergio Martins
fe7a8d450c
Rename Frame class to Group
2022-06-21 16:34:20 +01:00
Sergio Martins
b45644af74
Rename FrameViewInterface class to GroupViewInterface
2022-06-21 09:01:44 +01:00
Sergio Martins
73d627554a
Remove Frame.h/cpp to Group.h/cpp
...
It's a better name.
Files only for now. Contents will come in a followup.
2022-06-21 08:51:52 +01:00
Sergio Martins
b9773cd262
qtquick: Move some Q_INVOKABLES to the views
...
As only the views are exposed
2022-06-19 23:27:21 +01:00
Sergio Martins
da70b1baed
qtquick: Don't overload Q_INVOKABLES
...
Apparently QML doesn't support it very well.
Fixes #291
2022-06-19 20:26:19 +01:00
Sergio Martins
ea55c74768
Added MainWindow::internalLayout()
...
Allows the application to add more widgets next to the drop area.
(cherry-picked from commit 74dcbd994a )
2022-06-19 14:40:59 +01:00
Sergio Martins
729624ab04
EGLFS: Don't raise the main window when docking
...
EGLFS doesn't honour that the floating windows should be
on top and will make the floating windows go behind.
It's also unneeded to raise it on eglfs, since it's fullscreen.
(cherry-picked from commit d06c6e8f11 )
2022-06-19 14:37:52 +01:00
Sergio Martins
4fa43c7ba1
Make numSideBySide_recursive() ignore invisible items
...
We have invisible items that just remember the position of
other items.
(cherry-picked from commit 9f96eff663 )
2022-06-19 14:37:06 +01:00
Sergio Martins
1f95f67a15
Add DropLocation_Horizontal and DropLocation_Vertical
...
So we can quickly use a bitwise and to see if an arbitrary
drop location is vertical or horizontal.
(cherry-picked from commit 3260c65a6c )
2022-06-19 14:27:32 +01:00
Sergio Martins
73fd21939f
Allow segmented indicators to disable individual segments
...
The application developer might now want to show some segments.
Now he can use Config::setDropIndicatorAllowedFunc(), which previously
only worked for classic indicators
(cherry-picked from commit 2c8ceb67ef )
2022-06-19 14:23:35 +01:00
Sergio Martins
104a065aeb
Pass the DropArea to setDropIndicatorAllowedFunc() too
...
So the lambda can have more advanced usage and inspect the
target layout before allowing or disallowing the drop.
For our use case, we want to limit max 3 dock widgets side by side,
for example.
(cherry-picked from commit 982904e2ba )
2022-06-19 14:22:12 +01:00
Sergio Martins
7b4e04703d
Added MultiSplitter::numSideBySide_recursive()
...
(cherry-picked from commit f5622732ce )
2022-06-19 13:52:30 +01:00
Sergio Martins
a705ccfe5e
Fix typo in code snippet
2022-06-19 13:48:44 +01:00
Sergio Martins
84a8fd61b4
MainWindow: Allow to avoid the immediate QWidget::create()
...
In case you're going to put the main window into a layout you
don't want to have it create a QWindow.
(cherry-picked from commit 4727c9c7fc )
2022-06-19 13:25:53 +01:00
Sergio Martins
d1e29e6773
Add the possibility of setting the margin used for overlay docks
...
(cherry-picked from commit 9b8759c472 )
2022-06-19 13:19:50 +01:00
Sergio Martins
f2ddbd2cc3
Added KDDockWidgets::InitialVisibilityOption::PreserveCurrentTab
...
So you can insert into a tab group without changing the current
tab, if you want.
(cherry-picked from commit 58b8633e3d )
2022-06-19 13:14:54 +01:00
Sergio Martins
8a0fa46deb
Don't show middle dock indicator if frame isn't dockable
...
This was implemented but the logic was wrong.
Fixes central persistent showing the central indicator.
(cherry-picked from 6166e5805c )
2022-06-19 13:06:09 +01:00
Sergio Martins
28cc64be4a
Remove unused/duplicated file
2022-06-19 13:04:05 +01:00
Sergio Martins
08518e02e0
various - fix some misspellings
...
(cherry-picked from commit f3da0f0547 )
2022-06-19 13:00:06 +01:00
Sergio Martins
1e7f0d7c5f
various - update copyright year
...
(cherry-picked from commit b2fc0c3eb1 )
2022-06-19 12:57:51 +01:00
Sergio Martins
793661ea09
Workaround QTBUG-102430, don't move still maximized window
...
When dragging a maximized window we show normal, but we can
only start moving it when the window managers acknowledges the new
state. The state in QWidget isn't reliable.
(cherry-picked from commit 6e7268e42a )
2022-06-19 12:54:12 +01:00
Sergio Martins
4c177d7823
Save the last known window state from the window manager POV
...
Required for QTBUG-102430
(cherry-picked from commit 7e6c5b2d9f )
2022-06-19 12:52:35 +01:00
Sergio Martins
e763cb138a
Add a comment regarding QTBUG-102430
2022-06-19 12:47:11 +01:00
Sergio Martins
6da693c5da
Workaround FloatingWindow::windowStateChanged regarding QTBUG-102430
...
QWidget::windowStateChanged isn't useful as it's emitted once sync
and another async, with the same value. Only the async one is useful
as it will represent the real window manager state. Then we can do
further moves.
The QWindow one happens to be good (async), so use that one instead.
(cherry-picked from commit d4fe17a0bf )
2022-06-19 12:42:48 +01:00
Sergio Martins
940991c75e
Use FloatingWindow::isMaximizedOverride() instead of isMaximized()
...
This is for issue #286 .
Allows users to workaround buggy window managers.
(cherry-picked from commit 47f773ab7c )
2022-06-19 12:22:32 +01:00
Sergio Martins
c0d1bd3f92
tests|qtquick|Windows: Stabilize a test
...
The warning is benign and unrelated to anything kddw is doing
(cherry-picked from commit 1f638d2c7a )
2022-06-19 12:16:46 +01:00
Sergio Martins
92192b7949
Fix position of right overlay dockwidgets when there's a toolbar on the left
...
(cherry-picked from commit 7b73393095 )
2022-06-19 12:15:23 +01:00
Sergio Martins
9fda86a511
Linux: Fix dragging of maximized floating windows
...
They should restore their normal size when the drag starts
(cherry-picked from commit 1305dee081 )
2022-06-19 12:13:50 +01:00
Sergio Martins
4114f00183
Added dockWidgetInserted|Removed signals to TabBarWidget
...
Since QTabBar doesn't have them.
Useful for custom tab bars
(cherry-picked from commit 743dbc0718 )
2022-06-19 12:04:25 +01:00
Sergio Martins
848327d8b3
TitleBarWidget: Mark members as protected
...
So custom titlebars have more power
(cherry-picked from commit fd4588de0f )
2022-06-19 11:59:21 +01:00
Sergio Martins
44d38f9f84
Added TitleBar::tabBar()
...
Useful for people writing custom titlebar's with style that depends
on the current tab
(cherry-picked from commit 6ba10cfe12 )
2022-06-19 11:57:26 +01:00
Sergio Martins
fe7f71d986
MDI: Fix another case of showing resize handles wrong
...
(cherry-picked from commit 25b04d7ed8 )
2022-06-19 11:48:08 +01:00
Sergio Martins
05b7980cfe
MDI: Fix case where resize cursor would be shown for frame bellow
...
Was already fixed a few days ago, but this is the case for nested
mdi.
(cherry-picked from commit e345e89c35 )
2022-06-19 11:46:18 +01:00
Sergio Martins
f8b1745c68
Forward QCloseEvent to the MDI widgets too
...
Fixes case where docked MDI widgets were not able to block a close
(cherry-picked from commit 61cca1e5ec )
2022-06-19 00:56:42 +01:00
Sergio Martins
30f43d7579
Fix MainWindow not propagating close events to docked widgets
...
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.
(cherry-picked from commit 7db9938b85 )
2022-06-19 00:46:49 +01:00
Sergio Martins
950914e15c
Further move onCloseEvent to base class
...
So that it can be reused by MDI layouts too
(cherry-picked from commit 01cc915734 )
2022-06-19 00:34:31 +01:00
Sergio Martins
bd4aed18c9
Refactor: Move close event logic from FloatingWindow to DropArea
...
So main window can use it too
(cherry-picked from commit 3454b67a45 )
2022-06-19 00:32:46 +01:00
Sergio Martins
f530668711
Don't dereference potentially nullptr
2022-06-19 00:23:54 +01:00
Sergio Martins
c30a266c01
Don't try to restore to previous position if there isn't any
...
(cherry-picked from commit 524dff9105 )
2022-06-19 00:14:33 +01:00
Sergio Martins
66b91c1de3
Make redocking floating windows with tabs possible
...
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
(cherry-picked from commit 0099a19a82 )
2022-06-19 00:09:21 +01:00
Sergio Martins
4c670a552e
MDI: Fix resize cursor appearing for frames that had others on top
...
(cherry-picked from commit e6b8636e88 )
2022-06-19 00:05:19 +01:00
Sergio Martins
d5e46dff31
MDI: Fixed closing dock widget in MDI would close main window
...
We only close the window when the window is a FloatingWindow and
it's the last frame
(cherry picked from commit 86419fd979 )
2022-06-18 23:37:02 +01:00
Sergio Martins
ff92af1e62
Removed some TODOs
...
The comment is still there in case it's interesting for someone,
but it's not something that will be worked on
2022-06-18 22:24:21 +01:00