Sergio Martins
6aa4e979dc
Added DockWidgetBase::hasPreviousDockedLocation()
2020-10-05 13:52:36 +01:00
Sergio Martins
4a49dbc6b4
Add a DockWidget::isFloatingChanged() signal
...
For issue #73
2020-09-25 19:25:58 +01:00
Sergio Martins
ac7d06d4fe
When closing overlay, remove it from side bar too
...
Added test.
2020-09-20 23:46:37 +01:00
Sergio Martins
5168940422
When enabling auto-hide, don't overlay it immediately
...
Instead, hide it. Will be overlayed when the user toggles it.
2020-09-20 23:16:40 +01:00
Sergio Martins
54b28c42e2
Added DockWidgetBase::isOverlayed()
2020-09-20 13:48:17 +01:00
Sergio Martins
2659ddb76b
refactor: Decouple moveToSideBar from overlaying
...
overlaying just shows/hides the overlay, and not requires
the dock widget was added to the sidebar before
2020-09-20 13:44:04 +01:00
Sergio Martins
b8891a5727
Start implementing overlaying on top of main window
2020-09-20 12:56:31 +01:00
Sergio Martins
e1085fb770
Add experimental support for minimization to side-bar
...
Auto-hide not working yet. Just minimization.
Internal for now. Will be public once finished.
2020-09-18 18:35:41 +01:00
Sergio Martins
c8eaf88cf1
Added DockWidgetBase::mainWindow()
2020-09-18 17:20:41 +01:00
Sergio Martins
f3f812205d
Pass the new title to DockWidget::titleChanged() signal
2020-09-18 17:12:38 +01:00
Sergio Martins
d76b27863f
Don't center floating window if user moved it
...
Fixes #75
2020-09-16 16:51:05 +01:00
Sergio Martins
98225ac9a3
Fix DockWidget::isInMainWindow()
...
FloatingWindows are parented to the main window, so we need to stop
the loop once isWindow().
The tests didn't catch this because the floating window in the test
was created before the main window, so it truly didn't have a parent
Fixes #69
2020-09-11 22:33:25 +01:00
Sergio Martins
b510c2fd5f
Added DockWidget::isInMainWindow()
...
For task #69 .
A signal would be nice too, though.
2020-09-07 15:27:54 +01:00
Sergio Martins
92843b4972
Merge branch '1.0' into master
2020-08-30 14:46:28 +01:00
Sergio Martins
ae000e75bc
Allow DockWidget::setWidget() to be called multiple times
...
Fixes #66
2020-08-30 14:43:12 +01:00
Sergio Martins
9e2d001ac5
Add DockWidget::isFocused() for issue #60
...
Needs a signal now
2020-08-14 23:51:35 +01:00
Sergio Martins
f007451442
Fix case where floatAction() wouldn't trigger
...
Fixes #58
2020-08-12 21:21:04 +01:00
Sergio Martins
890784ba5a
Finish FocusScope support
...
When clicking on a TitleBar the focus will be redirected to either:
- Last widget that had focus inside the scope
- To the DockWidget. Implies the user setting a guest widget that
accepts focus
Fixes : #56
2020-08-08 17:34:06 +01:00
Sergio Martins
c9468bef8a
example: Add some helper code to debug focus
2020-08-08 17:34:06 +01:00
Sergio Martins
94258abf43
Decouple title bar icon from tab bar icon
...
You can now use different icons, or even just set an icon for the
title bar but not tab bar
Fixes #57
2020-08-08 14:05:42 +01:00
Sergio Martins
3c841aa2a9
qml: Make FrameQuick have a model for the dock widgets
...
More versatil for QML
2020-08-02 17:05:57 +01:00
Sergio Martins
0e1dc4bd45
qml: Remove some QWidget'isms
2020-07-31 21:06:11 +01:00
Sergio Martins
ebda537a11
qml: Make DockWidgetBase inherit from QWidgetAdapter
...
So we get access to maximumSize, sizePolicy and such API
for QQuickItems too
2020-07-26 20:37:49 +01:00
Sergio Martins
e9131897e4
qml: Remove QWidget'isms from DockWidgetBase
2020-07-26 16:16:06 +01:00
Allen Winter
b4f49895c2
clarify: licensing is GPL2 or GPL3 or commercial licensed
...
follow the REUSE specs
2020-07-24 18:16:13 -04:00
Sergio Martins
d7f9bf7adc
Remove two unneeded connects
...
Also since DockWidgetBase won't be a QObject soon
2020-06-24 22:33:11 +01:00
Sergio Martins
3217c61713
Help clang-tidy knowing that frame can't be null here
2020-06-23 17:48:40 +01:00
Sergio Martins
86e58dd8a7
Merge MultiSplitterLayout into MultiSplitter
...
No need to have two. It's a leftover from the old layouting engine
2020-06-11 16:34:28 +01:00
Sergio Martins
e54ef787ed
Some include cleanup
2020-06-11 11:03:12 +01:00
Sergio Martins
8baac15d24
Fix floating window position when dragging with constraints
...
When the detach starts we might make the window smaller so it
respects the max-size constraint. The quirk was that in that
case the window was no longer under the mouse cursor, so looked
weird while dragging, although it worked
2020-06-08 18:19:46 +01:00
Sergio Martins
d5797a3aea
Honour QSizePolicy::Fixed too
...
Some widgets, for example QPushButton, instead of having an explicit max size,
they communicate the need for a max size through their size policy
2020-06-07 19:53:06 +01:00
Sergio Martins
7c442dce85
Fix another place that should use setSuggestedGeometry
2020-06-04 21:47:47 +01:00
Sergio Martins
07ea3ff1a6
cleanup: Replace some qobject_casts with a function
2020-06-04 21:37:01 +01:00
Sergio Martins
874fd7d69f
Don't set the FloatingWindow geometry directly
...
Let's have an indirection, so FloatingWindow can do some adjustments
and use a smaller rect incase of max-size.
Since we don't want to enforce max-size, just when showing the window.
2020-06-04 21:21:11 +01:00
Sergio Martins
ddc49c9358
Don't warn when restoring and there's no last pos info
...
We now restore floating windows to their previous position too
when toggling float. If there's no last info it's fine
2020-06-04 18:21:52 +01:00
Sergio Martins
f5f39a37a1
Decouple DockWidget from TabWidget
...
TabWidget will be an implementation detail of FrameWidget, and not
shared by QtQuick
2020-06-03 21:38:47 +01:00
Sergio Martins
0a75d89848
Add Frame::detachTab()
...
The tab widget will be an implementation detail of FrameWidget and
not accessed by anyone
2020-06-03 21:18:38 +01:00
Sergio Martins
d4d83111ff
Added DockWidgetBase::isMainWindow()
2020-05-25 20:25:33 +01:00
Sergio Martins
d94263fce5
Allow each dock widget and main window to support multiple affinities
2020-05-25 14:14:17 +01:00
Sergio Martins
e28f82dcad
Make Item::hostWidget be a Layouting::Widget instead of QWidget
...
Just an abstraction preparing for QQuickItem support
2020-05-24 17:31:37 +01:00
Sergio Martins
3d95263b40
Fix examples build with installed kddw
2020-05-23 19:00:12 +01:00
Sergio Martins
a7013b4cf7
Make DockWidget::setFloating(false) save the last docking position
...
so we can restore to it when floating again
2020-05-22 11:42:00 +01:00
Sergio Martins
4917da9e7c
Minor: factorout some code into DockWidget::saveLastFloatingGeometry()
2020-05-22 11:37:25 +01:00
Sergio Martins
6d44362991
DockWidget::setFloating(true): restore to previous floating position
...
When floating a dock widget we restore it to the last known floating
position now
2020-05-22 11:12:12 +01:00
Sergio Martins
76ba261f62
Return LastPositions by reference
...
Otherwise we're calling setters on a temporary
2020-05-22 10:53:37 +01:00
Sergio Martins
b4526b007c
Make LastPositions::lastPosition private
...
Need to control how the setters are messing with it, to add more
of them
2020-05-21 18:56:44 +01:00
Sergio Martins
618ec9fd41
Minor, use the members directly
2020-05-21 18:15:06 +01:00
Sergio Martins
9779b8edc3
Deal in terms of LastPositions instead of the individual position
...
Just a refactoring to add more encapsulation
2020-05-21 17:43:51 +01:00
Sergio Martins
50934ae56d
Use a shared_ptr for Position, so we can pass LastPositions by value
2020-05-21 17:19:54 +01:00
Sergio Martins
2da37180b9
Start supporting multiple last positions
...
Pushing some boilerplate first, so the functional diff is smaller.
Wraps the old position class with one that will have many.
2020-05-21 16:52:03 +01:00