14#include "core/Logging_p.h"
15#include "kddockwidgets/core/MainWindow.h"
16#include "kddockwidgets/core/DockRegistry.h"
21 : m_mainWindow(controller)
79 auto dw = dockView ? dockView->
dockWidget() :
nullptr;
88 auto dw = dockView ? dockView->
dockWidget() :
nullptr;
89 auto relativeTo = relativeToDockView ? relativeToDockView->
dockWidget() :
nullptr;
100 auto dw = dockView ? dockView->
dockWidget() :
nullptr;
107 auto dw = dockView ? dockView->
dockWidget() :
nullptr;
113 auto dw = dockView ? dockView->
dockWidget() :
nullptr;
119 auto dw = dockView ? dockView->
dockWidget() :
nullptr;
125 auto dw = dockView ? dockView->
dockWidget() :
nullptr;
131 auto dw = dockView ? dockView->
dockWidget() :
nullptr;
141 KDDW_ERROR(
"Could not find dock widget {}", dockId);
151 KDDW_ERROR(
"Could not find dock widget {}", dockId);
160 KDDW_ERROR(
"Could not find dock widget {}", dockId);
169 KDDW_ERROR(
"Could not find dock widget {}", dockId);
178 KDDW_ERROR(
"Could not find dock widget {}", dockId);
187 KDDW_ERROR(
"Could not find dock widget {}", dockId);
196 KDDW_ERROR(
"Could not find dock widget {}", dockId);
201 const QString &relativeToDockId,
205 auto relativeTo = relativeToDockId.
isEmpty()
210 KDDW_ERROR(
"Could not find dock widget {}", dockId);
void moveToSideBar(DockWidgetViewInterface *)
QString uniqueName() const
MainWindow * mainWindow() const
Returns the main window controller.
void overlayOnSideBar(DockWidgetViewInterface *)
void addDockWidgetAsTab(DockWidgetViewInterface *dockwidget)
void addDockWidget(DockWidgetViewInterface *dockWidget, KDDockWidgets::Location location, DockWidgetViewInterface *relativeTo=nullptr, const KDDockWidgets::InitialOption &initialOption={})
void setPersistentCentralView(std::shared_ptr< Core::View >)
void setAffinities(const Vector< QString > &names)
void toggleOverlayOnSideBar(DockWidgetViewInterface *)
void layoutParentContainerEqually(DockWidgetViewInterface *)
Vector< QString > affinities() const
MainWindowOptions options() const
MainWindowViewInterface(MainWindow *)
void restoreFromSideBar(DockWidgetViewInterface *)
bool closeDockWidgets(bool force=false)
bool anySideBarIsVisible() const
void clearSideBarOverlay(bool deleteFrame=true)
bool sideBarIsVisible(KDDockWidgets::SideBarLocation) const
virtual ~MainWindowViewInterface()
MainWindow *const m_mainWindow
The MainWindow base-class. MainWindow and MainWindowBase are only split in two so we can share some c...
bool sideBarIsVisible(KDDockWidgets::SideBarLocation location) const
Returns whether the specified sidebar is visible.
void setAffinities(const Vector< QString > &names)
Sets the affinities names. Dock widgets can only dock into main windows of the same affinity.
QString uniqueName() const
Returns the unique name that was passed via constructor. Used internally by the save/restore mechanis...
void addDockWidgetAsTab(KDDockWidgets::Core::DockWidget *dockwidget)
Docks a DockWidget into the central group, tabbed.
void overlayOnSideBar(KDDockWidgets::Core::DockWidget *dw)
Shows the dock widget overlayed on top of the main window, placed next to the sidebar.
void toggleOverlayOnSideBar(KDDockWidgets::Core::DockWidget *dw)
Shows or hides an overlay. It's assumed the dock widget is already in a side-bar.
void layoutParentContainerEqually(KDDockWidgets::Core::DockWidget *dockWidget)
like layoutEqually() but starts with the container that has dockWidget. While layoutEqually() starts ...
bool anySideBarIsVisible() const
Returns whether any side bar is visible.
void setPersistentCentralView(std::shared_ptr< View > widget)
Sets a persistent central widget. It can't be detached.
void layoutEqually()
layouts all the widgets so they have an equal size within their parent container
void clearSideBarOverlay(bool deleteGroup=true)
closes any overlayed dock widget. The sidebar still displays them as button.
MainWindowOptions options() const
Returns the main window options that were passed via constructor.
void moveToSideBar(KDDockWidgets::Core::DockWidget *dw)
Moves the dock widget into one of the MainWindow's sidebar. Means the dock widget is removed from the...
bool closeDockWidgets(bool force=false)
Closes all dock widgets which are docked into this main window This is convenience to calling DockWid...
bool isMDI() const
Returns whether this main window is using an MDI layout. In other words, returns true if MainWindowOp...
Vector< QString > affinities() const
Returns the list of affinity names. Empty by default.
void restoreFromSideBar(KDDockWidgets::Core::DockWidget *dw)
Removes the dock widget from the sidebar and docks it into the main window again.
void addDockWidget(KDDockWidgets::Core::DockWidget *dockWidget, KDDockWidgets::Location location, KDDockWidgets::Core::DockWidget *relativeTo=nullptr, const KDDockWidgets::InitialOption &initialOption={})
Docks a DockWidget into this main window.
bool isEmpty() const const