mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-27 06:49:02 +08:00
70 lines
2.1 KiB
C++
70 lines
2.1 KiB
C++
//============================================================================
|
|
/// \file DockComponentsFactory.cpp
|
|
/// \author Uwe Kindler
|
|
/// \date 10.02.2020
|
|
/// \brief Implementation of DockComponentsFactory
|
|
//============================================================================
|
|
|
|
//============================================================================
|
|
// INCLUDES
|
|
//============================================================================
|
|
#include <DockComponentsFactory.h>
|
|
|
|
#include <memory>
|
|
|
|
#include "DockWidgetTab.h"
|
|
#include "DockAreaTabBar.h"
|
|
#include "DockAreaTitleBar.h"
|
|
#include "DockWidget.h"
|
|
#include "DockAreaWidget.h"
|
|
|
|
namespace ads
|
|
{
|
|
static std::unique_ptr<CDockComponentsFactory> DefaultFactory(new CDockComponentsFactory());
|
|
|
|
|
|
//============================================================================
|
|
CDockWidgetTab* CDockComponentsFactory::createDockWidgetTab(CDockWidget* DockWidget) const
|
|
{
|
|
return new CDockWidgetTab(DockWidget);
|
|
}
|
|
|
|
|
|
//============================================================================
|
|
CDockAreaTabBar* CDockComponentsFactory::createDockAreaTabBar(CDockAreaWidget* DockArea) const
|
|
{
|
|
return new CDockAreaTabBar(DockArea);
|
|
}
|
|
|
|
|
|
//============================================================================
|
|
CDockAreaTitleBar* CDockComponentsFactory::createDockAreaTitleBar(CDockAreaWidget* DockArea) const
|
|
{
|
|
return new CDockAreaTitleBar(DockArea);
|
|
}
|
|
|
|
|
|
//============================================================================
|
|
const CDockComponentsFactory* CDockComponentsFactory::factory()
|
|
{
|
|
return DefaultFactory.get();
|
|
}
|
|
|
|
|
|
//============================================================================
|
|
void CDockComponentsFactory::setFactory(CDockComponentsFactory* Factory)
|
|
{
|
|
DefaultFactory.reset(Factory);
|
|
}
|
|
|
|
|
|
//============================================================================
|
|
void CDockComponentsFactory::resetDefaultFactory()
|
|
{
|
|
DefaultFactory.reset(new CDockComponentsFactory());
|
|
}
|
|
} // namespace ads
|
|
|
|
//---------------------------------------------------------------------------
|
|
// EOF DockComponentsFactory.cpp
|