Added dockWidgetAdded signal to CDockManager

This commit is contained in:
Uwe Kindler 2020-09-18 08:25:47 +02:00
parent fdedd7d92a
commit f645fe725a
2 changed files with 10 additions and 1 deletions

View File

@ -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;
}

View File

@ -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