//============================================================================ /// \file DockComponentsFactory.cpp /// \author Uwe Kindler /// \date 10.02.2020 /// \brief Implementation of DockComponentsFactory //============================================================================ //============================================================================ // INCLUDES //============================================================================ #include #include #include "DockWidgetTab.h" #include "DockAreaTabBar.h" #include "DockAreaTitleBar.h" #include "DockWidget.h" #include "DockAreaWidget.h" namespace ads { static std::unique_ptr 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