Commit Graph

4108 Commits

Author SHA1 Message Date
Sergio Martins
8767159cc9 example: Remove duplicate minimal-mdi/MyWidget.cpp
It was using the cpp from the main example but the header from
minimal-mdi. Instead, share both the impl and the header

(cherry-picked from commit a8c50f1876)
2022-06-19 11:28:41 +01:00
Sergio Martins
198bd60565 example: Added --blocks-close-event
Makes dock widget #0 reject the close event, meaning it won't close.

(cherry-picked from commit 21765efbac)
2022-06-19 11:18:02 +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
d47130f0c8 appveyor: cherry-picked changed from master
f98ce37c12
339edf1143
2022-06-19 00:25:07 +01:00
Sergio Martins
f530668711 Don't dereference potentially nullptr 2022-06-19 00:23:54 +01:00
Sergio Martins
67bb7c16cf CMakeLists.txt - find COMPONENTS to search for Qt modules
(cherry-picked from commit 8b8ef7f2b0)
2022-06-19 00:22:01 +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
303532483b vscode: filter-out some todo-tree folders, mostly 3rdparty 2022-06-18 22:24:21 +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
Sergio Martins
49b2a10cc6 Fix QtQuick build on Windows 2022-06-18 19:13:45 +01:00
Sergio Martins
a3f7126dfe cmake: Prefix ci build dirs with "build-" 2022-06-18 19:49:08 +01:00
Sergio Martins
2faecc68c0 Don't build the "Fuzzer"
It hasn't been needed in a long time.
I'll enable it once it's needed. Build needs fixing though
2022-06-18 19:48:19 +01:00
Sergio Martins
fe75297a29 cmake: Add CI presets
The idea is to test the different code paths, that means:
  - Qt5 vs Qt6
  - dev-mode vs release

but also to test that the qtquick frontend isn't including anything
from qtwidgets and vice-versa.
2022-06-18 19:40:59 +01:00
Sergio Martins
60c6ffaabb Rename MDIArea class to MDIArea_qtwidgets
To match the filename now
2022-06-18 18:15:19 +01:00
Sergio Martins
408fe315ed Rename MDIArea.h to views/MDIArea_qtwidgets.h
As done for all other views. This one was missing
2022-06-18 17:51:19 +01:00
Sergio Martins
c7f33f589e README: Add warning that 2.0 is in active development 2022-06-18 13:44:49 +01:00
Sergio Martins
942d086905 Fix linking on Qt/macOS 2022-06-18 13:36:07 +01:00
Sergio Martins
8dbd87ae0d cmake: Only add qtquick/ to include path if it's being built
And vice-versa for qtwidgets
2022-06-18 13:32:36 +01:00
Sergio Martins
f04e813af3 Fix Platform.h not being installed 2022-06-18 13:17:58 +01:00
Sergio Martins
a0accacb5d Rename views/MainWindowMDI.h -> ../views/MainWindowMDIViewInterface.h
This one was missing
2022-06-18 13:14:18 +01:00
Sergio Martins
1b0bae7780 Don't include Window.h in DockRegistry.h
As the latter is installed while the former is not.
Window.h depends on KDBindings so would rather not require it publically.
2022-06-18 13:06:29 +01:00
Sergio Martins
f7bb0c1dbd Fix examples trying to be installed to /
Only worked when being built from within kddw.
2022-06-18 12:42:24 +01:00
Sergio Martins
4c4dcf4423 Move KDBindings usage from Platform.h to Platform_p.h.
So user doesn't need to install it
2022-06-18 12:28:54 +01:00
Sergio Martins
7017ce8396 Move KDBindings usage from View.h to View_p.h
KDBindings is implementation detail. User won't have to install
it, at this point.
2022-06-18 12:15:42 +01:00
Sergio Martins
9f1a9df621 cmake: Install view interface headers too 2022-06-18 11:48:29 +01:00
Sergio Martins
d7b57d460f cmake: Don't install Window*h and Item_p.h
They are unneeded, and expose kdbindings
2022-06-18 11:46:46 +01:00
Sergio Martins
6be5339fd3 Add d-ptr to DockRegistry, hides usage of kdbindings 2022-06-18 11:21:53 +01:00
Sergio Martins
82d933ad34 Remove unused include 2022-06-18 11:16:41 +01:00
Sergio Martins
cae9627e06 Add a d-ptr to FloatingWindow_qtwidgets
So we don't expose kdbindings in the API
2022-06-18 11:14:15 +01:00
Sergio Martins
5a6ceade6c cmake: Fix QtQuick not being found when using installed kddw 2022-06-18 10:39:50 +01:00
Sergio Martins
e2870dbe4f cmake: Fix warning about KDDockWidgets_LIBRARY_QTID not being defined 2022-06-18 10:35:19 +01:00
Sergio Martins
d5471aceb6 cmake: Install headers 2022-06-18 10:25:52 +01:00
Sergio Martins
e63a34a4a5 Rename DockRegistry_p.h -> DockRegistry.h
People use it.
2022-06-18 09:28:03 +01:00
Sergio Martins
8be6183543 Include cleanup
Removed unneeded controllers/ includes from headers
2022-06-18 09:15:30 +01:00
Sergio Martins
1ee5d21d4a examples: Remove controller usage, use views instead
Controllers is low level API
2022-06-18 08:36:09 +01:00
Sergio Martins
26ba2199cb Moved 2 more DockWidget enums to KDDockWidget.h
So users don't have to include controllers/DockWidget.h
2022-06-18 08:16:16 +01:00
Sergio Martins
08d2b6f764 Fix documentation of MyTitleBar_CSS.h
It was still refering to the old widgets
2022-06-18 07:54:05 +01:00
Sergio Martins
7ae49ee330 qtquick: Move last DockWidget Q_PROPERTY from controller to view 2022-06-18 00:34:26 +01:00
Sergio Martins
a609f2233b Move DockWidgetOption enum to KDDockWidget.h
controllers/DockWidget.h is not something users will include directly
2022-06-18 00:27:58 +01:00
Sergio Martins
d3de373995 Move "widget" Q_PROPERTY to the qtquick view 2022-06-17 21:54:30 +01:00
Sergio Martins
a5f364da03 qtquick: Fix qml accessing the frame controller
It should access the view instead, as the controller will cease to
be QObject
2022-06-17 20:12:44 +01:00
Sergio Martins
499c9412bb Don't make all DropArea views all DropArea::onResized()
Do it in the controller once, instead of repeating it
2022-06-17 20:06:51 +01:00
Sergio Martins
c48a100f73 Remove unused titleBar() method 2022-06-17 19:58:22 +01:00
Sergio Martins
7e7c9d7300 Rename the remaining view interfaces to *ViewInterface 2022-06-17 18:56:34 +01:00