Move some dock widget view code into the shared DockWidgetViewInterface
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user