Sergio Martins
704e6d0182
Fix the amalgamation build a bit
...
As Config is already in another namespace
2020-05-26 16:12:25 +01:00
Sergio Martins
7634438f6c
Add unit-test to previous commit
2020-05-25 23:30:31 +01:00
Sergio Martins
314cd6649d
Item: also emit numVisibleItemsChanged when inserting a container
...
Since it can have items inside too
2020-05-25 23:27:13 +01:00
Sergio Martins
e08a7a6725
Fix tst_lastFloatingPositionIsRestored when there's a frame
...
Otherwise only passes on offscreen qpa which has no frame
2020-05-25 22:19:05 +01:00
Sergio Martins
45d5d7b519
update .gitignore
2020-05-25 21:47:03 +01:00
Sergio Martins
63c90875aa
example: Add example of docking main window into main window
2020-05-25 21:45:21 +01:00
Sergio Martins
ee4ad02722
Fix FloatingWindow::hasSingleFrame()
...
Use m_dropArea->numFrames() which happens first, otherwise there
can be a moment where the frames() aren't updated yet
2020-05-25 21:43:01 +01:00
Sergio Martins
cd1f52a4bb
When looking for drop target honour affinity
2020-05-25 21:29:29 +01:00
Sergio Martins
66a0959ac0
Honour main windows being nested in Frame::floatingWindow()
...
In such case the Frame is inside the nested main window, not floating.
2020-05-25 20:52:15 +01:00
Sergio Martins
39d70c8186
Fix crash due to recurency in DragController
...
A drop could cause the events to be processed and trigger
another mouse move
Fixes : #19
2020-05-25 20:48:18 +01:00
Sergio Martins
d541a41536
Minor refactoring, factor some code into a function
2020-05-25 20:40:02 +01:00
Sergio Martins
9761759fee
Fix Floating window returning frames from nested main windows
...
Which we want to support now too
2020-05-25 20:27:08 +01:00
Sergio Martins
d4d83111ff
Added DockWidgetBase::isMainWindow()
2020-05-25 20:25:33 +01:00
Sergio Martins
de09d5532f
Fix DropArea::numFrames()
...
Was counting with placeholder items too. This should fix title bars
being wrong in some cases.
2020-05-25 20:12:29 +01:00
Sergio Martins
944138273f
Tests: stabilize tst_embeddedMainWindow
...
Going 50px into the window was too short and didn't reach the embedded
window to show the indicators.
Also, it's the inner indicator we want, the other isn't visible as the
window is single frame
2020-05-25 20:11:01 +01:00
Sergio Martins
d2ca14bf99
DebugWindow: Also print affinities
2020-05-25 14:39:19 +01:00
Sergio Martins
84391c693c
DebugWindow: Remove duplicate dump debug button
...
And the second one was incomplete as it didn't dump for the
floating windows
2020-05-25 14:31:21 +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
2fd9d45525
Link multisplitter as a PUBLIC dependency if kddockwidgets
...
This way user doesn't need to explicitly link against it
2020-05-25 06:52:25 +01:00
Sergio Martins
8461f1f79e
kddockwidgets_multisplitter is now a library of its own
2020-05-25 06:45:13 +01:00
Sergio Martins
d9badf3ffd
Fix build
2020-05-25 06:10:18 +01:00
Sergio Martins
1ece0f0fef
Add a fwd header for Separator_qwidget.h
...
Makes QtC happy with editing the example
2020-05-24 20:54:25 +01:00
Sergio Martins
4af582a21f
Update .gitignore
2020-05-24 20:53:52 +01:00
Sergio Martins
ab90da3b19
Readability: Rename Item::guest() and Item::widget()
...
Their name wasn't matching their return value
2020-05-24 20:52:23 +01:00
Sergio Martins
45f4d9f6a8
Item no longer depends on QWidget
2020-05-24 20:47:58 +01:00
Sergio Martins
ba49e1cbe2
Separator no longer inherits from QWidget
...
Only SeparatorWidget does
2020-05-24 20:29:49 +01:00
Sergio Martins
c67f1c28f6
Fix build
2020-05-24 20:23:07 +01:00
Sergio Martins
de0bcf9ce3
readability: Rename asWidget() to asQWidget()
2020-05-24 20:03:02 +01:00
Sergio Martins
3bbc33d8c4
example: Revive the custom separator example
...
Pass -p to see a custom painted separator
2020-05-24 19:31:15 +01:00
Sergio Martins
e8abc23f59
Use a dedicated export macro file for multisplitter/
...
As it's independent from KDDW
2020-05-24 19:24:16 +01:00
Sergio Martins
c63c713bea
Move SeparatorWidget into multisplitter/
...
multisplitter/ is to be a reusable component without needing KDDW
2020-05-24 19:13:39 +01:00
Sergio Martins
c33c7ab450
Don't leak Layouting::Widget
...
Don't create it directly, instead of multi-inheritance
2020-05-24 18:45:44 +01:00
Sergio Martins
c31edd0cd8
Remove a stray qDebug
2020-05-24 18:30:56 +01:00
Sergio Martins
b395b96234
Fix tst_multisplitter leaks
...
The Widget wrapper was leaking
2020-05-24 18:30:07 +01:00
Sergio Martins
16aac70510
Make MultiSplitter inherit from Layouting::Widget too
...
Since it's the host widget.
Fixes the Widget wrapper leaking. And no need for so much boiler-plate
2020-05-24 18:25:19 +01:00
Sergio Martins
7c9ee4f497
Move the mouse handling from Separator to SeparatorWidget
...
As it's QWidget specific
2020-05-24 17:58:04 +01:00
Sergio Martins
7f49f6e6a4
Move the separator's rubber band into SeparatorWidget
...
as it's specific to QWidget
2020-05-24 17:49:14 +01:00
Sergio Martins
c477fce1d9
Add Widget::show(), hide() and setGeometry()
2020-05-24 17:43:54 +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
7016656264
Rename GuestInterface to Widget
...
So we can use it to abstract the host too, not just the guest.
2020-05-24 15:23:10 +01:00
Sergio Martins
7f981a1d1d
Item cleanup, moved LengthOnSide to impl
2020-05-24 14:05:04 +01:00
Sergio Martins
94b4051e31
Fix namespace build
2020-05-24 13:57:17 +01:00
Sergio Martins
86a2b14921
Move more code to GuestWidget
2020-05-23 21:14:11 +01:00
Sergio Martins
4fab2cf360
Move more code into GuestWidget
2020-05-23 20:11:27 +01:00
Sergio Martins
0a2fb6ed73
Add GuestWidget.h
...
The QtWidgets counter-part for GuestInterface.
Removing QWidget from Item
2020-05-23 19:22:01 +01:00
Sergio Martins
3d95263b40
Fix examples build with installed kddw
2020-05-23 19:00:12 +01:00
Sergio Martins
e75b47737c
Move GuestInterface into its own file
2020-05-23 18:59:58 +01:00
Sergio Martins
9ad6eefa7a
Add Layouting::Config
...
To host many of the scatered static member variables which
held some settings that rarely change
2020-05-23 18:40:20 +01:00
Sergio Martins
2527b39368
Moved the multisplitter wrapper outside of multisplitter/
...
As it depends on kddw framework, while multisplitter/ is the
agnostic layouting engine
2020-05-23 17:01:20 +01:00
Sergio Martins
71c7a7c9a9
Move more ItemContainer members to private
2020-05-23 16:46:43 +01:00