Sergio Martins
ccbd15c922
Merge branch '1.2'
2020-12-19 14:12:10 +00:00
Sergio Martins
d1f48b0685
Save the last overlayed size
...
We might want to restore it
2020-12-19 14:09:27 +00:00
Sergio Martins
5e64463a8c
Remove some Item_p.h/multisplitter includes
...
that's private API for the layouts, don't want them exposed higher
in the stack
2020-12-17 13:48:50 +00:00
Sergio Martins
e897ce6e8e
qtquick: Add a replacement for QAction
...
So we don't depend on QtWidgets lib
2020-11-29 18:44:00 +00:00
Sergio Martins
a0fb47af58
Fix -Woverloaded-virtual
2020-11-26 14:52:04 +00:00
Sergio Martins
864670b0a1
qtquick: Fix some cases where floating windows didn't have parent
...
Happened because floatingWindow->parentWidget() was null. On QtWidgets
this works because QWidget::parentWidget() will return the transient parent
without a problem.
2020-11-19 17:47:02 +00:00
Sergio Martins
1393ae224f
Fix DockWidget::windowActiveAboutToChange() being emitted too much
...
Was being emitted even when it didn't affect our window.
This caused an explosion of signals when we had many dock widgets.
2020-11-17 18:52:54 +00:00
Sergio Martins
e9a321039f
Renamed signal to windowActiveAboutToChange()
...
Added the 'aboutTo', as the event hasn't been caught by the top-level
window yet
2020-11-09 13:46:16 +00:00
Sergio Martins
b93f115b53
Added DockWidget::windowActiveChanged() signal
...
Tracking the top-level window's 'isActiveWindow' property is difficult
since the dock widget's top-level window is changing all the time
when docking and undocking. So added a convenience signal
2020-11-09 13:35:05 +00:00
Sergio Martins
420ac9044e
Merge branch '1.1' into master
2020-10-23 17:11:45 +01:00
Sergio Martins
392dac5691
Use Qt::WA_PendingMoveEvent instead of Qt::WA_Moved
...
We check if the user provided position before putting a floating
window in a default position. Qt::WA_Moved however has the problem
that it's not cleared, so second time you show a window, it will
have it, even if user didn't set geometry.
Use Qt::WA_PendingMoveEvent instead, which was made for tracking
moves made before the first show.
2020-10-23 17:07:14 +01:00
Sergio Martins
926103325c
qtquick: Fix close events not being delivered
...
Also ported some tests from tst_docks to tst_common, which
were failing due to close events not working. Fixed now
2020-10-11 12:42:20 +01:00
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