Add overloads taking view interface instead of controller

People won't be using the controllers directly
This commit is contained in:
Sergio Martins
2022-06-15 21:32:25 +01:00
parent 1e3acd2a92
commit 2a6bd9e415
13 changed files with 143 additions and 29 deletions

View File

@@ -109,4 +109,21 @@ void DockWidgetViewInterface::moveToSideBar()
m_dockWidget->moveToSideBar();
}
void DockWidgetViewInterface::addDockWidgetAsTab(DockWidgetViewInterface *other,
KDDockWidgets::InitialOption initialOption)
{
Controllers::DockWidget *dw = other ? other->dockWidget() : nullptr;
m_dockWidget->addDockWidgetAsTab(dw, initialOption);
}
void DockWidgetViewInterface::addDockWidgetToContainingWindow(DockWidgetViewInterface *other,
KDDockWidgets::Location location,
DockWidgetViewInterface *relativeTo,
KDDockWidgets::InitialOption initialOption)
{
Controllers::DockWidget *dw = other ? other->dockWidget() : nullptr;
Controllers::DockWidget *relativeToDw = relativeTo ? relativeTo->dockWidget() : nullptr;
m_dockWidget->addDockWidgetToContainingWindow(dw, location, relativeToDw, initialOption);
}
} // namespace