Commit Graph

20 Commits

Author SHA1 Message Date
Sergio Martins
63c90875aa example: Add example of docking main window into main window 2020-05-25 21:45:21 +01:00
Sergio Martins
0dac5eed68 Item: Add DefaultSizeMode enum
To control how we calculate the item's initial size when
we add it
2020-05-10 21:20:31 +01:00
Sergio Martins
97c1ca30fd Layouting engine rewrite
The layouting was becoming too complex to maintain and to introduce
new features. Was even buggy, the fuzzer was constantly finding
bugs, which took hours to workaround.

Problem with the old layout engine is that there was a catch 22, between
Items driving the separators, and separators driving the anchors.

The new layout is much simpler, both in implementation and conceptually.
There's simply a recursive hierarchy of Item elements. An Item can either
have a QWidget to show, or be a ItemContainer, which contains Item children,
and so forth. Each ItemContainer is either vertical or horizontal. That's enough
to represent the "nested multi-splitter" concept which KDDW uses.

After each item insertion/deletion/resize, the separators are regenerated. They
are essentially dumb now.

TODO:
- Separators are drawn, but are not interactive yet
- There's 5 tests failing
- LayoutSaver scalling functionality
2020-05-04 00:02:03 +01:00
Sergio Martins
ca211f2494 LayoutSaver: Add an option to restore in relative sizes
and not touching the main window geometry.

The option is not exposed yet, there's a layouting bug to fix first.
2020-02-25 19:06:43 +00:00
Allen Winter
df692686e7 various - update copyright year 2020-01-07 11:36:56 -05:00
Sergio Martins
5a5e6f3762 Add Q_DECLARE_OPERATORS_FOR_FLAGS for FrameOptions 2019-10-08 18:01:11 +01:00
Sergio Martins
a0d05b4e2b Move Frame::Options enum to KDDockWidgets.h
So we can forward declare Frame and not include private headers
in FrameworkWidgetFactory.h
2019-10-07 13:43:48 +01:00
Sergio Martins
b5fad9a601 docs++ 2019-10-05 12:54:25 +01:00
Sergio Martins
eb96288534 docs: Improved @file docs 2019-10-04 17:33:42 +01:00
Sergio Martins
d960c27b00 Remove unneeded ; 2019-08-20 15:25:48 +01:00
Sergio Martins
fc380eab72 More tests for rectForDrop() 2019-07-17 11:46:42 +01:00
Sergio Martins
8d31bb85fa Fix clazy warnings 2019-07-15 13:10:17 +01:00
Sergio Martins
5af0482a7e WIP: Allow to add a dock widget directly hidden
So it's not shown
2019-07-09 19:35:01 +01:00
Sergio Martins
ca5376e4de Improve debug 2019-07-04 16:18:16 +01:00
Sergio Martins
25af853f2f Move some static functions into the global namespace 2019-06-19 23:00:43 +01:00
Sergio Martins
525d72b1c9 docs++
Just @file for now
2019-06-18 14:44:33 +01:00
Allen Winter
7241bf6794 various - move Author to its own line 2019-04-24 13:02:32 -04:00
Allen Winter
6ef9f83b3f various - cleaning up include guards 2019-04-24 12:51:22 -04:00
Sergio Martins
87f2325c71 Fix copyrights 2019-04-24 15:27:04 +01:00
Sergio Martins
e43b673858 Initial commit 2019-04-24 14:49:01 +01:00