From f645fe725a27a104b2eb0af22a5e627f1e924490 Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Fri, 18 Sep 2020 08:25:47 +0200 Subject: [PATCH] Added dockWidgetAdded signal to CDockManager --- src/DockManager.cpp | 5 ++++- src/DockManager.h | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/DockManager.cpp b/src/DockManager.cpp index e0302b4..32bfeb0 100644 --- a/src/DockManager.cpp +++ b/src/DockManager.cpp @@ -706,6 +706,7 @@ CFloatingDockContainer* CDockManager::addDockWidgetFloating(CDockWidget* Dockwid { d->UninitializedFloatingWidgets.append(FloatingWidget); } + emit dockWidgetAdded(Dockwidget); return FloatingWidget; } @@ -732,7 +733,9 @@ CDockAreaWidget* CDockManager::addDockWidget(DockWidgetArea area, CDockWidget* Dockwidget, CDockAreaWidget* DockAreaWidget) { d->DockWidgetsMap.insert(Dockwidget->objectName(), Dockwidget); - return CDockContainerWidget::addDockWidget(area, Dockwidget, DockAreaWidget); + auto AreaOfAddedDockWidget = CDockContainerWidget::addDockWidget(area, Dockwidget, DockAreaWidget); + emit dockWidgetAdded(Dockwidget); + return AreaOfAddedDockWidget; } diff --git a/src/DockManager.h b/src/DockManager.h index 8c15209..822ba12 100644 --- a/src/DockManager.h +++ b/src/DockManager.h @@ -552,6 +552,12 @@ signals: */ void dockAreaCreated(ads::CDockAreaWidget* DockArea); + /** + * This signal is emitted if a dock widget has been added to this + * dock manager instance. + */ + void dockWidgetAdded(ads::CDockWidget* DockWidget); + /** * This signal is emitted just before the given dock widget is removed * from the dock manager