Sergio Martins
aded290573
Don't save last position if the window was hidden already
...
Bug was happening when calling close() an closed dock widget, it
would then save the position of the invisible window. Next time it
was open it would appear in a bogus location. 0,0 in my case.
2020-02-06 15:01:58 +00:00
Sergio Martins
fca010ce2a
Center floating dock widgets within their main window
...
In case they don't have any previous position.
This is better than showing them at 0,0
2020-02-06 14:30:01 +00:00
Sergio Martins
3771aa7a40
Fix toggleAction() emitting spurious toggle events
...
When showing a dockwidget it's inserted into a tab widget, which
will generate a hide event, which will toggle the action to off
even though the dock widget is opened for our purposes
2020-02-05 13:06:53 +00:00
Sergio Martins
1cac350547
Add convenience method DockWidget::isOpen()
2020-02-01 19:47:16 +00:00
Allen Winter
df692686e7
various - update copyright year
2020-01-07 11:36:56 -05:00
Sergio Martins
92bbe4d4f7
Remove a dock widget from the layout before adding as tab
...
So the layout can grow first and not complain there's not enough
space.
Fixes fuzzer test-case 3.json.
The warning was: "Constraints not honoured" in Item::onLayoutRequest()
2019-10-15 12:51:49 +01:00
Sergio Martins
ac313c5a24
Don't save floating geometry on clear()
...
clear() shouldn't save anything.
Fixes floating dockwidgets not having proper geometry when shown
after clear() was called.
2019-10-08 14:59:31 +01:00
Sergio Martins
21579f2743
Minor method renames
2019-10-07 00:16:16 +01:00
Sergio Martins
b5fad9a601
docs++
2019-10-05 12:54:25 +01:00
Albert Astals Cid
262d57b890
Add a few const &
...
as suggested by clang-tidy
2019-09-30 15:57:03 +02:00
Sergio Martins
cf90980094
Fix toggleAction() not emitting its signals
...
User might connect to it.
Use a less violent way of guarding against recursion
2019-09-24 22:08:57 +01:00
Sergio Martins
68a536bb67
Minor renaming, deserialize() no matches serialized()
2019-09-21 16:18:19 +01:00
Sergio Martins
c80a16d2c1
Also use the intermediate representation when serializing
2019-09-21 15:15:44 +01:00
Sergio Martins
65c9693a62
Restoring now reads from the intermediate representation
...
Only the intermediate representation is filled in from the stream
now. TODO: GUI->intermediate.
2019-09-20 17:24:22 +01:00
Allen Winter
29c41cade3
various - minor spelling, include guard fixes
...
also clean duplicate includes
Change-Id: I3fdd02fd1d07e7061003dd5fbed9e04b7b9ca928
Reviewed-on: https://codereview.kdab.com/70210
Reviewed-by: Sérgio Martins <sergio@kdab.com >
2019-09-09 17:10:36 +01:00
Sergio Martins
cad7486907
Introduce MainWindowBase
...
MainWindow is widgets only. MainWindowBase will be used by QtQuick too.
2019-09-04 15:31:55 +01:00
Sergio Martins
46a5a580bc
Add LayoutSaver::restoredDockWidgets()
...
Implemented as a property it's better that the LayoutSaver
doesn't carry state about this. Then we would need to remove dock
widgets from the list if they are deleted. Also not a important
enough feature to be on the DockWidget public interface.
2019-08-28 17:56:18 +01:00
Sergio Martins
59cdadf386
Add DockWidgetBase::titleBar()
2019-08-24 22:55:06 +01:00
Sergio Martins
c1ea98825e
Improve includes
2019-08-12 16:41:00 +01:00
Sergio Martins
990e487fed
rename name() to uniqueName() for readability
2019-08-08 22:30:29 +01:00
Sergio Martins
020571b6f5
The QtQuick stuff compiles now
2019-08-08 12:52:18 +01:00
Sergio Martins
89757def76
Abstract TabWidget away from QtWidgets, so can be used for QtQuick
2019-08-08 00:41:48 +01:00
Sergio Martins
77244f93f5
Fix FloatingWindow sometimes appearing with title bar
2019-08-07 22:29:44 +01:00
Sergio Martins
eafc00657b
Separator: Decouple the QWidget dependency
...
There's no Separator and SeparatorWidget. The former only with
state/logic. To be reused by QtQuick.
2019-08-06 13:32:06 +01:00
Sergio Martins
8742da76ae
DockWidgetBase: Move layouting code into DockWidget.cpp
...
We don't want QWidget related code in the base class, to be
shared with QML
2019-08-06 12:58:07 +01:00
Sergio Martins
464ef4fd93
Move widget specific stuff from DockWidgetBase to DockWidget
2019-08-06 00:36:00 +01:00
Sergio Martins
fb837b7713
Move DockWidget.cpp into widgets/
...
As it's specific to QtWidgets. It's mostly empty now
and inheriting from DockWidgetBase, but we'll move a few stuff.
2019-08-05 23:35:44 +01:00