Skip to content

Commit 3efc5f2

Browse files
Added DockComponentsFactory.h documentation, changed DockComponentsFactory showcase in MainWindow after discussion on GitHub
1 parent 3eba025 commit 3efc5f2

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

demo/MainWindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class CCustomComponentsFactory : public ads::CDockComponentsFactory
151151
using Super = ads::CDockComponentsFactory;
152152
ads::CDockAreaTitleBar* createDockAreaTitleBar(ads::CDockAreaWidget* DockArea) const override
153153
{
154-
auto TitleBar = Super::createDockAreaTitleBar(DockArea);
154+
auto TitleBar = new ads::CDockAreaTitleBar(DockArea);
155155
auto CustomButton = new QToolButton(DockArea);
156156
CustomButton->setToolTip(QObject::tr("Help"));
157157
CustomButton->setIcon(svgIcon(":/adsdemo/images/help_outline.svg"));

src/DockComponentsFactory.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,22 @@ class ADS_EXPORT CDockComponentsFactory
4040
*/
4141
virtual ~CDockComponentsFactory() {}
4242

43+
/**
44+
* This default implementation just creates a dock widget tab with
45+
* new CDockWidgetTab(DockWIdget).
46+
*/
4347
virtual CDockWidgetTab* createDockWidgetTab(CDockWidget* DockWidget) const;
48+
49+
/**
50+
* This default implementation just creates a dock area tab bar with
51+
* new CDockAreaTabBar(DockArea).
52+
*/
4453
virtual CDockAreaTabBar* createDockAreaTabBar(CDockAreaWidget* DockArea) const;
54+
55+
/**
56+
* This default implementation just creates a dock area title bar with
57+
* new CDockAreaTitleBar(DockArea).
58+
*/
4559
virtual CDockAreaTitleBar* createDockAreaTitleBar(CDockAreaWidget* DockArea) const;
4660

4761
/**

0 commit comments

Comments
 (0)