From 3efc5f2ada7cae5c084fd25e5d86c3d68d62ad0d Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Tue, 11 Feb 2020 15:38:49 +0100 Subject: [PATCH] Added DockComponentsFactory.h documentation, changed DockComponentsFactory showcase in MainWindow after discussion on GitHub --- demo/MainWindow.cpp | 2 +- src/DockComponentsFactory.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/demo/MainWindow.cpp b/demo/MainWindow.cpp index 186ad37..5a19d91 100644 --- a/demo/MainWindow.cpp +++ b/demo/MainWindow.cpp @@ -151,7 +151,7 @@ public: using Super = ads::CDockComponentsFactory; ads::CDockAreaTitleBar* createDockAreaTitleBar(ads::CDockAreaWidget* DockArea) const override { - auto TitleBar = Super::createDockAreaTitleBar(DockArea); + auto TitleBar = new ads::CDockAreaTitleBar(DockArea); auto CustomButton = new QToolButton(DockArea); CustomButton->setToolTip(QObject::tr("Help")); CustomButton->setIcon(svgIcon(":/adsdemo/images/help_outline.svg")); diff --git a/src/DockComponentsFactory.h b/src/DockComponentsFactory.h index 92e7f52..f0598e9 100644 --- a/src/DockComponentsFactory.h +++ b/src/DockComponentsFactory.h @@ -40,8 +40,22 @@ public: */ virtual ~CDockComponentsFactory() {} + /** + * This default implementation just creates a dock widget tab with + * new CDockWidgetTab(DockWIdget). + */ virtual CDockWidgetTab* createDockWidgetTab(CDockWidget* DockWidget) const; + + /** + * This default implementation just creates a dock area tab bar with + * new CDockAreaTabBar(DockArea). + */ virtual CDockAreaTabBar* createDockAreaTabBar(CDockAreaWidget* DockArea) const; + + /** + * This default implementation just creates a dock area title bar with + * new CDockAreaTitleBar(DockArea). + */ virtual CDockAreaTitleBar* createDockAreaTitleBar(CDockAreaWidget* DockArea) const; /**