Sergio Martins
f08d39ecc8
Fix clazy warning about returning false in event filter
...
Use the base class instead
2023-02-28 12:34:10 +00:00
Sergio Martins
af455bb37e
examples: Show how to hide dock indicators when ctrl is pressed
...
Fixes issue #334 and issue #337 .
Won't add this directly into the library, as each project
has different requirements regarding this.
It's easy to do in application code though.
2023-02-07 23:51:20 +00:00
Allen Winter
6f6679d6be
update copyright year to 2023
2023-01-06 12:24:12 -05:00
Allen Winter
b61c26669b
cmake-format a bit prettier
2022-09-15 09:04:00 -04:00
Sergio Martins
4691f9bfa5
Ran clang-format over the codebase
2022-07-12 11:28:05 +01:00
Allen Winter
460b898bea
cmake-lint, cmake-format CMake files
2022-07-09 09:11:45 -04:00
Sergio Martins
982904e2ba
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.
2022-06-02 15:19:01 +01:00
Allen Winter
f3da0f0547
various - fix some misspellings
2022-04-14 12:27:29 -04:00
Allen Winter
b2fc0c3eb1
various - update copyright year
2022-04-14 12:01:05 -04:00
Sergio Martins
a97663294c
example: Allow to test propagation of close event in the mdi example
2022-03-09 17:18:11 +00:00
Sergio Martins
bb4cf802f5
examples: Remove more duplicate MyWidget.cpp/h files
...
share with main example instead
2022-03-09 16:42:15 +00:00
Sergio Martins
701069617c
example: Allow to test propagation of close event in the mdi example
2022-03-09 16:30:26 +00:00
Sergio Martins
a8c50f1876
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
2022-03-09 16:27:25 +00:00
Sergio Martins
21765efbac
example: Added --blocks-close-event
...
Makes dock widget #0 reject the close event, meaning it won't close.
2022-03-09 12:46:20 +00:00
Sergio Martins
54bf24d5d4
Added Config::setDropIndicatorAllowedFunc()
2022-02-11 19:49:23 +00:00
Sergio Martins
21adfe06ad
Add an example for nested docking within MDI
2022-01-24 18:31:10 +00:00
Allen Winter
2fbe4f872e
Merge branch '1.5'
2022-01-20 08:15:23 -05:00
Allen Winter
93e60a743e
update copyright year
2022-01-20 08:05:26 -05:00
Sergio Martins
aa3c3272ee
Fix examples build on macOS and Windows
...
For some reason a X11 dependency was commited by mistake.
2022-01-08 18:39:16 +00:00
Sergio Martins
5b87fb4435
Add an examples/mdi_with_docking/ example
2022-01-07 17:31:20 +00:00
Allen Winter
4dd66969af
examples/dockwidgets/MyTitleBar_CSS.h - add multiple include guard
2021-09-28 16:36:55 -04:00
Waqar Ahmed
f6f772edc5
Fix leaks in kddockwidgets_example
2021-09-17 11:27:09 +01:00
Waqar Ahmed
7af2095f2f
Allow switching tabs via context menu in the tabs area
...
This change allows you to switch tabs via the context menu. The context
menu only shows up if you click on the empty area beside the tabs.
Can be tested with `--allow-switch-tabs-via-menu` option in the example.
Fixes #232
Signed-off-by: Waqar Ahmed <waqar.ahmed@kdab.com >
2021-09-11 12:46:23 +01:00
Sergio Martins
b5c11ce199
example: Add an example about using stylesheets
2021-09-08 23:14:47 +01:00
Sergio Martins
1ccdf445eb
Introduce MainWindowOption_HasCentralWidget
...
You can now set an arbitrary widget as "central widget".
It's similar to MainWindowOption_HasCentralFrame, however the widget
won't be detachable and won't show tabs.
Similar to what you'd get with QMainWindow central widget concept.
Example:
QWidget *myWidget = new MyWidget();
mainWindow->setPersistentCentralWidget(myWidget);
Fixes #225
2021-08-30 10:12:46 +01:00
Allen Winter
22a709a39e
fix more misspellings
2021-07-15 10:14:04 -04:00
Sergio Martins
463b6a1322
qtquick: Fix using initial visibility option
...
Needs to be fully qualified.
Added an example.
Fixes #212
2021-07-02 16:41:49 +01:00
Sergio Martins
e1578436d0
Added Flag_ShowButtonsOnTabBarIfTitleBarHidden
2021-07-01 18:08:41 +01:00
Sergio Martins
701df72db6
Remove some ifdefs regarding 5.9
...
The one missing QT_VERSION_CHECK was even wrong and triggering
even with Qt 5.15.
2021-07-01 16:54:44 +01:00
Sergio Martins
457ea402d5
qtquick|example: Fix toggling not working on non-current tab
...
A non-current tab isn't visible, its dock widget is however opened.
Relates to #211
2021-06-28 23:30:05 +01:00
Sergio Martins
cd0f2f4e33
Introduced Config::setDropIndicatorsInhibited(bool)
...
Allows you to disable support for drop indicators while dragging
2021-05-18 18:00:04 +01:00
Sergio Martins
50f6e76e81
qtquick|examples: Don't call them "MainWindow"
...
Rather "main layout", as they are not top-levels, unlike for
QWidgets
As suggested in issue #196
2021-05-17 22:27:34 +01:00
Sergio Martins
7475c7cc71
Remove unneeded include
2021-04-28 21:15:08 +01:00
Sergio Martins
7958eeeded
Fully qualify LayoutSaver_p.h includes
...
Now that it's installed
2021-04-28 21:13:44 +01:00
Sergio Martins
1fca162fb2
quick|example: Enable hpdi scaling
2021-04-25 10:47:07 +01:00
Sergio Martins
6ffd3e574f
qtquick: Add support for LayoutSaver
...
You can now instantiate LayoutSaver {} in QML and save/restore
layouts
2021-04-08 23:23:24 +01:00
Sergio Martins
748243f512
qtquick: Allow to call addDockWidget() from QML
2021-04-05 22:56:08 +01:00
Sergio Martins
7c101ae3af
qtquick: comments++
2021-04-05 20:41:59 +01:00
Sergio Martins
742ef7d529
qtquick: Use the MainWindowOptions enum instead of int
2021-04-05 20:28:57 +01:00
Sergio Martins
2706a3d379
qtquick: Add "Close All" option in the example
2021-04-05 18:31:56 +01:00
Sergio Martins
1167545199
Update Changelog
2021-04-05 16:51:36 +01:00
Sergio Martins
fcd1fae77e
qtquick: Add a MenuBar to the example, allows to toggle
2021-04-05 16:48:13 +01:00
Sergio Martins
06db10561c
qtquick: Use QQmlApplicationEngine in the examples
...
So we can add menus and such
2021-04-05 16:41:45 +01:00
Sergio Martins
ead9e8945e
qtquick: Allow to add the guest widget declaratively
...
This is an alternative to setting source
2021-04-05 16:22:56 +01:00
Sergio Martins
8fa63a8773
qtquick: Remove unneeded private import
2021-04-05 15:06:57 +01:00
Sergio Martins
8a0e6c90b9
qtquick: the user will now use "MainWindowLayout" instead of "MainWindow"
...
As MainWindow wasn't actually a window.
While for QtWidgets it makes sense for it to be a QMainWindow, in
QtQuick let's make it easy to embed a dock widget layout.
Also, our MainWindowQuick doesn't have any menus and what not that
QMainWindow has.
2021-04-05 15:04:27 +01:00
Sergio Martins
7c291691aa
qtquick: Fix customtitlebar example
2021-04-05 14:43:51 +01:00
Sergio Martins
cec8cf25ef
Rename MainWindowWrapper to MainWindowInstantiator
...
Makes it consistent with DockWidgetInstantiator.
Creates the main window onComplete, no need for the user
to call init() explicitly anymore
2021-04-05 14:42:46 +01:00
Sergio Martins
5a2812ecf3
qtquick: Fix undefined variable error in example
2021-04-05 14:35:40 +01:00
Sergio Martins
0f09ba717f
qtquick: Move the "Another" button into the main window
2021-04-05 14:09:59 +01:00