MCPcopy Create free account
hub / github.com/KDE/labplot / dockWidget

Method dockWidget

src/backend/core/AbstractPart.cpp:53–66  ·  view source on GitHub ↗

* \brief Wrap the view() into a PartMdiView. * * A new view is only created the first time this method is called; * after that, a pointer to the pre-existing view is returned. */

Source from the content-addressed store, hash-verified

51 * after that, a pointer to the pre-existing view is returned.
52 */
53ContentDockWidget* AbstractPart::dockWidget() const {
54 if (!m_dockWidget) {
55 m_dockWidget = new ContentDockWidget(const_cast<AbstractPart*>(this));
56 connect(m_dockWidget, &ads::CDockWidget::closed, [this] {
57 const bool deleteOnClose = Settings::readDockPosBehavior() == Settings::DockPosBehavior::AboveLastActive;
58 if (deleteOnClose && !m_suppressDeletion) {
59 m_dockWidget->dockManager()->removeDockWidget(m_dockWidget);
60 m_dockWidget = nullptr;
61 deleteView();
62 }
63 });
64 }
65 return m_dockWidget;
66}
67#endif
68
69#ifndef SDK

Callers 4

saveMethod · 0.45
loadMethod · 0.45

Calls 2

removeDockWidgetMethod · 0.45
dockManagerMethod · 0.45

Tested by

no test coverage detected