14#include "core/Logging_p.h"
16#include "kddockwidgets/core/MainWindow.h"
17#include "kddockwidgets/core/DockRegistry.h"
22 : m_mainWindow(controller)
80 auto dw = dockView ? dockView->
dockWidget() :
nullptr;
89 auto dw = dockView ? dockView->
dockWidget() :
nullptr;
90 auto relativeTo = relativeToDockView ? relativeToDockView->
dockWidget() :
nullptr;
101 auto dw = dockView ? dockView->
dockWidget() :
nullptr;
108 auto dw = dockView ? dockView->
dockWidget() :
nullptr;
114 auto dw = dockView ? dockView->
dockWidget() :
nullptr;
120 auto dw = dockView ? dockView->
dockWidget() :
nullptr;
126 auto dw = dockView ? dockView->
dockWidget() :
nullptr;
132 auto dw = dockView ? dockView->
dockWidget() :
nullptr;
142 KDDW_ERROR(
"Could not find dock widget {}", dockId);
152 KDDW_ERROR(
"Could not find dock widget {}", dockId);
161 KDDW_ERROR(
"Could not find dock widget {}", dockId);
170 KDDW_ERROR(
"Could not find dock widget {}", dockId);
179 KDDW_ERROR(
"Could not find dock widget {}", dockId);
188 KDDW_ERROR(
"Could not find dock widget {}", dockId);
197 KDDW_ERROR(
"Could not find dock widget {}", dockId);
202 const QString &relativeToDockId,
206 auto relativeTo = relativeToDockId.
isEmpty()
211 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 setAffinities(const Vector< QString > &names)
void addDockWidget(DockWidgetViewInterface *dockWidget, KDDockWidgets::Location location, DockWidgetViewInterface *relativeTo=nullptr, KDDockWidgets::InitialOption initialOption={})
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.
void clearSideBarOverlay(bool deleteFrame=true)
closes any overlayed dock widget. The sidebar still displays them as button.
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 addDockWidget(KDDockWidgets::Core::DockWidget *dockWidget, KDDockWidgets::Location location, KDDockWidgets::Core::DockWidget *relativeTo=nullptr, KDDockWidgets::InitialOption initialOption={})
Docks a DockWidget into this main window.
void layoutEqually()
layouts all the widgets so they have an equal size within their parent container
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.
bool isEmpty() const const