Sergio Martins
fdcdaae1f1
Fix build with C++11
...
initialized lambda captures is a C++14 extension
2023-02-10 14:53:42 +00:00
Mauro Persano
1fc57b02b3
Save side bar overlay geometry when frame is resized
...
Previously we were updating the side bar overlay geometry only when the
side bar was closed. So if we open the side bar overlay, resize it, and
save/restore the layout state, we won't get the last side bar size.
Save it every time the frame is resized.
2023-01-27 12:19:26 +00:00
Allen Winter
6f6679d6be
update copyright year to 2023
2023-01-06 12:24:12 -05:00
Allen Winter
70def3e14c
misspellings found by codespell v2.2.1
2022-09-13 12:12:16 -04:00
Sergio Martins
4691f9bfa5
Ran clang-format over the codebase
2022-07-12 11:28:05 +01:00
Sergio Martins
6f177bc2df
Assert that dock widget passed to MainWindow::addDockWidget is valid
2022-07-05 13:48:47 +01:00
Albert Astals Cid
9b8759c472
Add the possibility of setting the margin used for overlay docks
2022-05-17 15:32:28 +01:00
Albert Astals Cid
7b73393095
Fix position of right overlay dockwidgets when there's a toolbar on the left
2022-04-05 17:13:29 +01:00
Sergio Martins
7db9938b85
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.
2022-03-09 15:47:02 +00:00
Sergio Martins
2eeb4aac27
Fix Item_p.h being exposed in public API
...
Forward declare Item instead
2022-02-12 14:37:19 +00:00
Sergio Martins
721795b113
Remove LastPosition struct, move its members to Position
...
It was an unneeded indirection that didn't provide added semantics
2022-01-29 19:29:03 +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
Eism
336f1146d3
Fixed the restoration of geometry when user closed maximized window
2021-12-22 15:31:26 +00: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
Waqar Ahmed
13fe276dbe
Fix possible division by zero
2021-09-11 12:05:00 +01:00
Sergio Martins
4ea7953a76
Don't allow to overlay central widget
2021-09-02 10:52:56 +01:00
Sergio Martins
77b5d1630d
Added DockWidget::isPersistentCentralDockWidget()
2021-09-02 10:24:43 +01:00
Sergio Martins
f962989484
Fix MainWindow::addDockWidgetAsTab with MainWindowOption_HasCentralWidget
...
When using central widget no tabs are supported
2021-09-02 10:17:37 +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
c85904c67e
2 more misspelling fixes for contractions.
2021-07-15 10:25:53 -04:00
Allen Winter
4f4a5de700
fix misspellings found by codespell
2021-07-15 09:46:53 -04:00
Allen Winter
7001aa58ce
clang-format on code base
2021-07-12 17:05:37 -04:00
Sergio Martins
79fe9c2875
cmake: Remove private/ from our PRIVATE include path
...
Because some build systems don't support public/private includes,
and would require us to add private/ to the public include path.
This allows for an easier integration with some more exotic
build systems
2021-06-15 19:53:05 +01:00
Eism
3e30685eb4
Expose MainWindowBase::windowGeometry(), so it can be used
...
Just moves the code from private to public.
For issue #199
2021-05-23 11:34:53 +01:00
Sergio Martins
c6af93adcb
qtquick: When saving geometry, save the QWindow geometry
...
As that's what we'll restore. The "MainWindow" isn't an actual
main window, and it's parented in some QtQuick hierarchy.
Will help with issue #196 , which isn't fixed yet.
Should be fixed in the restore part next.
2021-05-17 22:20:44 +01:00
Sergio Martins
bd985781b9
Minor refactoring
2021-05-17 22:13:17 +01:00
Sergio Martins
affb48f44d
Fix restoring side-bar widget when it was deleted previously
...
We need to consult the user's widget factory, just as we do
for other cases where the dock widget is missing
2021-04-29 21:36:56 +01:00
Sergio Martins
f388b11d0d
Added MainWindowBase::frameCountChanged()
...
So you can know when the layout added or removed dock widgets
Fixes #190
2021-04-28 16:28:04 +01:00
Sergio Martins
83c744041e
Merge branch '1.3'
2021-04-27 23:52:17 +01:00
Sergio Martins
dcac39a35f
Don't restore window's maximized state when using RestoreOption_RelativeToMainWindow
...
We don't restore main window's geometry either
Fixes issue #184
2021-04-27 23:50:40 +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
74c74593e2
Don't restore window's maximized state when using RestoreOption_RelativeToMainWindow
...
We don't restore main window's geometry either
Fixes issue #184
2021-04-26 19:19:06 +01:00
Sergio Martins
44ae75110b
Added MainWindowBase::closeAllDockWidgets()
2021-03-31 10:51:20 +01: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
7dcc6dc114
Frame now takes care of its own resize handler
...
No need to set it from outside
2021-02-11 18:56:45 +00:00
Sergio Martins
64db52fd17
Move the CursorPositions header to the enums header instead
...
Otherwise will have to include WidgetResizeHandler_p.h
where I don't want to. And make it an installed header etc.
2021-02-11 18:52:21 +00:00
Sergio Martins
788c497cbb
Don't crash if it's a MDI layout
2021-02-10 00:01:47 +00:00
Sergio Martins
8dca2e346c
Add experimental MDI support
2021-02-09 19:25:28 +00:00
Sergio Martins
b995986318
Decouple MainWindow a bit more from DropArea
2021-02-09 18:04:11 +00:00
Sergio Martins
4d147c7ff3
Remove two drop area dependencies
2021-02-09 17:34:40 +00:00
Sergio Martins
da1fddffe1
Decouple MultiSplitter from MainWindow and FloatingWidget
...
They deal in its base class instead (LayoutWidget)
2021-02-09 16:05:56 +00:00
Allen Winter
a421cb0b01
various - include private header first, remove header dupes
2021-02-07 07:07:49 -05:00
Sergio Martins
4c33cd6409
Sidebar overlays now maintain their size when toggled
...
Fixes #155
2021-02-06 22:55:14 +00:00
Sergio Martins
ea48d52447
refactor MainWindowBase::updateOverlayGeometry()
...
Receives a size instead of a bool now.
2021-02-06 22:30:21 +00:00
Sergio Martins
85f4be750a
Remove bogus sizing
2021-02-06 21:43:05 +00:00
Sergio Martins
0ba37a347b
Save last overlayed location
...
For issue #155
2021-02-06 20:12:39 +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