Added CDockComponentsFactory for creation of components for the docking framework

This commit is contained in:
Uwe Kindler
2020-02-11 08:32:49 +01:00
parent a4ef161f4f
commit ff1439c719
8 changed files with 146 additions and 8 deletions

View File

@@ -28,9 +28,10 @@
//============================================================================
// INCLUDES
//============================================================================
#include "DockWidgetTab.h"
#include "DockAreaWidget.h"
#include <iostream>
#include <QStackedLayout>
#include <QScrollBar>
#include <QScrollArea>
@@ -53,8 +54,8 @@
#include "DockAreaTabBar.h"
#include "DockSplitter.h"
#include "DockAreaTitleBar.h"
#include <iostream>
#include "DockComponentsFactory.h"
#include "DockWidgetTab.h"
namespace ads
@@ -317,7 +318,7 @@ DockAreaWidgetPrivate::DockAreaWidgetPrivate(CDockAreaWidget* _public) :
//============================================================================
void DockAreaWidgetPrivate::createTitleBar()
{
TitleBar = new CDockAreaTitleBar(_this);
TitleBar = componentsFactory()->createDockAreaTitleBar(_this);
Layout->addWidget(TitleBar);
QObject::connect(tabBar(), &CDockAreaTabBar::tabCloseRequested, _this, &CDockAreaWidget::onTabCloseRequested);
QObject::connect(TitleBar, &CDockAreaTitleBar::tabBarClicked, _this, &CDockAreaWidget::setCurrentIndex);