Commit Graph

29 Commits

Author SHA1 Message Date
Sergio Martins
743dbc0718 Added dockWidgetInserted|Removed signals to TabBarWidget
Since QTabBar doesn't have them.
Useful for custom tab bars
2022-03-12 12:47:26 +00:00
Allen Winter
93e60a743e update copyright year 2022-01-20 08:05:26 -05:00
Allen Winter
7001aa58ce clang-format on code base 2021-07-12 17:05:37 -04:00
Sergio Martins
c4ebef1f1e Remove an ifdef only relevant to older Qt 2021-07-01 16:50:01 +01:00
Allen Winter
720dad1ed6 clean comment of double words "to to" and "the the" 2021-06-25 10:21:33 -04:00
Sergio Martins
8ab8e0524b Workaround Qt bug which broke the focus chain
Focusing a tab widget would focus an hidden tab bar, which makes
the propagation stop

Fixes #180
2021-04-30 15:59:27 +01:00
Sergio Martins
eb9fa6f567 Add unit-test for issue #154 2021-01-29 19:07:32 +00:00
Allen Winter
875544a449 Merge branch '1.2' 2021-01-02 09:32:20 -05:00
Allen Winter
a2f4c972a6 update copyright year 2021-01-02 09:27:50 -05:00
Sergio Martins
012ed4cf1d qtquick: Uncomment another test regarding tab widget 2020-12-24 11:43:13 +00:00
Sergio Martins
2bb46b1cdf Uncomment another tab test 2020-12-23 23:11:09 +00:00
Sergio Martins
113263a4a1 qtquick: Enable one more QTabBar test 2020-12-23 22:47:36 +00:00
Sergio Martins
771bf10951 Merge branch '1.2' 2020-12-22 18:48:22 +00:00
Sergio Martins
cd859d6725 Fix a bunch of clazy warnings 2020-12-22 17:01:50 +00:00
Sergio Martins
8b98dafba2 TabBar::numDockWidgets() doesn't need to be virtual 2020-12-20 12:32:50 +00:00
Sergio Martins
424453ab57 Double clicking on a tab will make it float
Also really required for Wayland, where we don't another way to
float a single tab, as the float button affects all of them.
2020-10-17 12:09:47 +01:00
Sergio Martins
bc04863439 Wayland: Dragging a tab or a nested dock widget now shows pixmap
TODO: Supporting a drop for those two cases
2020-10-16 10:33:01 +01:00
Sergio Martins
85cb289bc4 Also focus when clicking on the current tab
Fixes issue #71
2020-09-14 21:08:48 +01:00
Sergio Martins
2cb25fefe4 Minor: Add the tab widget as a member 2020-09-11 23:40:41 +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
163b194398 Fix clang build, mostly shadowing warnings 2020-06-11 17:00:54 +01:00
Milian Wolff
d58abf170f Don't leak TabBarWidget's proxy style
Fixes leak reported by LSAN:

```
    #0 0x7f7b5687e968 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cc:104
    #1 0x7f7b2e5b1096 in KDDockWidgets::TabBarWidget::TabBarWidget(KDDockWidgets::TabWidget*) ../3rdParty/kddockwidgets/src/private/widgets/TabBarWidget.cpp:71
    #2 0x7f7b2e295ba4 in KDDockWidgets::DefaultWidgetFactory::createTabBar(KDDockWidgets::TabWidget*) const ../3rdParty/kddockwidgets/src/FrameworkWidgetFactory.cpp:71
    #3 0x7f7b2e5b8f54 in KDDockWidgets::TabWidgetWidget::TabWidgetWidget(KDDockWidgets::Frame*) ../3rdParty/kddockwidgets/src/private/widgets/TabWidgetWidget.cpp:38
```

The owernship rules for QProxyStyle <-> QStyle are pure madness.
We do not want to delete the proxy we use as a base. And we must
not ever create multiple proxy styles for the same style either.
So add a static singleton for the proxy style and set its parent
to the qApp. This seems to work fine, at least the leak is gone
and we also don't get a crash at shutdown...
2020-03-25 14:03:24 +01:00
Sergio Martins
ca4d63ed2e Don't override the users tab bar QProxyStyle 2020-03-05 18:02:23 +00:00
Sergio Martins
cf0b8fd029 Fix build with Qt 5.9, SH_Widget_Animation_Duration is too new 2020-02-18 11:16:49 +00:00
Sergio Martins
a35e088988 Only allow to re-order tabs if we have more than 1
Otherwise it's confusing

Fixes: #27
2020-02-18 11:06:04 +00:00
Sergio Martins
232e96ee0e Fix crash when detaching tabs and the move animation is still enabled
Qt bug, but workaround here.
2020-02-18 10:36:16 +00:00
Allen Winter
df692686e7 various - update copyright year 2020-01-07 11:36:56 -05:00
Sergio Martins
927510dfff Support re-ordering tabs with mouse
Just set KDDockWidgets::Config::Flag_AllowReorderTabs before creating
the dock widgets.

Fixes #20
2019-12-26 15:19:27 +00:00
Sergio Martins
787f7802be Move the private code into a private/ folder
It's nice to have a similar include hierarchy at build time and install
time.

It also makes things more explicit
2019-10-20 19:24:54 +01:00