Commit Graph

317 Commits

Author SHA1 Message Date
Sergio Martins
84f0c45cbd qtquick: Add tabs to the customtabbar example
So the user doesn't need to add tabs manually to see them
2022-07-18 10:46:54 +01:00
Sergio Martins
ee59ad5e4b qtquick: Port customtabbar example to TabBarBase.qml
It's now fully functional and styled.
2022-07-18 10:39:53 +01:00
Sergio Martins
48bac96c71 qtquick: Add example of custom tabBar
Will do some styling in a follow up
2022-07-17 20:11:18 +01:00
Sergio Martins
62020a3ff9 qtquick|example: Allow users to test floating windows with native titlebar 2022-07-11 21:43:16 +01:00
Allen Winter
54a29b5cae Merge branch 'master' into 2.0 2022-07-09 11:09:35 -04:00
Allen Winter
460b898bea cmake-lint, cmake-format CMake files 2022-07-09 09:11:45 -04:00
Sergio Martins
9a8539fa42 qtquick: Add support for "Always show tabs" option
Shows the tab even if the group only has 1 dock widget
2022-07-07 18:05:33 +01:00
Sergio Martins
b1605cc58b Rename Group::tabWidget() to Group::stack()
Matches its class name now
2022-07-07 11:37:47 +01:00
Sergio Martins
8383b227aa qtquick|examples: Add an option to hide title bar 2022-07-07 11:30:34 +01:00
Sergio Martins
54ad9ec2f2 cmake: format with cmake-format 2022-07-04 11:20:19 +01:00
Waqar Ahmed
3638622c48 Fix unity build 2022-06-30 13:53:40 +05:00
Sergio Martins
6cd6408bef cmake: Install v1.x compatible headers for QtWidgets
It's nicer to include DockWidget.h than views/DockWidget_qtwidget.h.
QtQuick won't need pretty headers as the recommended way is to use from QML
directly, not C++
2022-06-25 13:13:00 +01:00
Sergio Martins
95d711ece7 qtquick: Allow to use the MDI feature from QML
No need to use low level C++ API anymore
2022-06-25 11:45:01 +01:00
Sergio Martins
74a1520382 examples: Use less controllers 2022-06-25 11:13:21 +01:00
Sergio Martins
31ba0ec52d mdi: Don't expose the controllers directly in the API 2022-06-24 22:42:31 +01:00
Sergio Martins
cc918c5195 More "frame" to "group" renaming 2022-06-22 13:42:22 +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
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
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
e2e34fb11b examples: Remove more duplicate MyWidget.cpp/h files
share with main example instead

(cherry-picked from commit bb4cf802f5)
2022-06-19 11:35:54 +01:00
Sergio Martins
1935d3bace example: Allow to test propagation of close event in the mdi example
(cherry-picked from commit 701069617c)
2022-06-19 11:32:37 +01:00
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
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
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
a0accacb5d Rename views/MainWindowMDI.h -> ../views/MainWindowMDIViewInterface.h
This one was missing
2022-06-18 13:14:18 +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
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
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
5e2cc2cc12 Remove old fwd header 2022-06-15 21:56:18 +01:00
Sergio Martins
2a6bd9e415 Add overloads taking view interface instead of controller
People won't be using the controllers directly
2022-06-15 21:51:56 +01:00
Sergio Martins
d2aba705fb qtquick: Rename guestView to guestItem in the public API 2022-06-15 20:13:42 +01:00
Sergio Martins
921d94d731 Added MainWindow_qtwidgets::setPersistentCentralWidget()
Which is nicer for the end user as it deals in QWidget
2022-06-15 19:37:12 +01:00
Sergio Martins
01b2bbc11c Rename "persistent widget" to "persistent view" 2022-06-15 19:27:04 +01:00
Sergio Martins
a45f53f9d9 examples: Don't mention mainWindow much in the examples
Added DockRegistry::mainDockingAreas() as synonym for mainwindows().
2022-06-15 18:45:37 +01:00
Sergio Martins
9fdf0c2ae1 examples: Remove unneeded header and TODO 2022-06-15 05:18:11 +01:00
Sergio Martins
e6dd002ca8 qtquick: Rename MainWindowLayout to DockingArea
Since it's not an actual Window, it's just a QQuickItem. QtQuick has
proper Window items that mean an actual Window.
2022-06-15 00:27:41 +01:00
Sergio Martins
627b6a1593 qtquick: Bump qml imports to 2.0 2022-06-15 00:15:44 +01:00
Sergio Martins
755bc6ac14 cmake: Don't add src/ to include path
Fully qualify includes instead
2022-06-14 16:57:22 +01:00
Sergio Martins
dafa14536f examples: include cleanup 2022-06-13 23:39:31 +01:00
Sergio Martins
a4d337e891 Fully qualify header paths when including controllers
so this still works when private headers are installed
2022-06-13 23:24:43 +01:00
Sergio Martins
169d2fe8e2 qtquick: Fix custom titlebar example
qrc path was wrong
2022-06-13 22:45:34 +01:00
Sergio Martins
4615936f9e Fix minor typo 2022-06-13 22:42:28 +01:00
Sergio Martins
ebaf0d170f examples: Rename minimal_mdi to mdi
There's not much functionality to show, so no point in saying it's
minimal
2022-06-13 22:39:31 +01:00