Move some dock widget view code into the shared DockWidgetViewInterface

This commit is contained in:
Sergio Martins
2022-06-15 20:10:20 +01:00
parent e754bb25c6
commit 78815664cc
6 changed files with 41 additions and 53 deletions

View File

@@ -10,6 +10,8 @@
*/
#include "DockWidgetViewInterface.h"
#include "kddockwidgets/controllers/DockWidget.h"
#include "kddockwidgets/controllers/DockWidget_p.h"
namespace KDDockWidgets::Views {
@@ -18,6 +20,23 @@ DockWidgetViewInterface::DockWidgetViewInterface(Controllers::DockWidget *contro
{
}
Controllers::Frame *DockWidgetViewInterface::frame() const
{
return m_dockWidget->dptr()->frame();
}
Controllers::DockWidget *DockWidgetViewInterface::dockWidget() const
{
return m_dockWidget;
}
Controllers::TitleBar *DockWidgetViewInterface::actualTitleBar() const
{
if (Controllers::Frame *frame = this->frame())
return frame->actualTitleBar();
return nullptr;
}
DockWidgetViewInterface::~DockWidgetViewInterface() = default;
} // namespace