From b353c210eef681fa921704d5022550c4118c51e9 Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Fri, 22 Nov 2019 21:53:17 +0100 Subject: [PATCH] Added dockAreaCreated signal that is emitted whenever a new dock area is created - this allows an application to set custom icons and tooltips for the title bar buttons --- src/DockAreaWidget.cpp | 4 ++++ src/DockManager.h | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/src/DockAreaWidget.cpp b/src/DockAreaWidget.cpp index 03f4065..8723299 100644 --- a/src/DockAreaWidget.cpp +++ b/src/DockAreaWidget.cpp @@ -354,6 +354,10 @@ CDockAreaWidget::CDockAreaWidget(CDockManager* DockManager, CDockContainerWidget d->createTitleBar(); d->ContentsLayout = new DockAreaLayout(d->Layout); + if (d->DockManager) + { + emit d->DockManager->dockAreaCreated(this); + } } //============================================================================ diff --git a/src/DockManager.h b/src/DockManager.h index 2b20012..fd59278 100644 --- a/src/DockManager.h +++ b/src/DockManager.h @@ -391,6 +391,13 @@ signals: * perspective */ void perspectiveOpened(const QString& PerspectiveName); + + /** + * This signal is emitted, if a new DockArea has been created. + * An application can use this signal to set custom icons or custom + * tooltips for the DockArea buttons. + */ + void dockAreaCreated(CDockAreaWidget* DockArea); }; // class DockManager } // namespace ads //-----------------------------------------------------------------------------