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

Method ContentDockWidget

src/frontend/core/ContentDockWidget.cpp:25–41  ·  view source on GitHub ↗

! * \class ContentDockWidget * * \brief ads::CDockWidget wrapper for aspect views. * * In addition to the functionality provided by ads::CDockWidget, * this class automatically updates the window title when AbstractAspect::caption() is changed * and holds the connection to the actual data visualized in this window via the pointer to \c AbstractPart. */

Source from the content-addressed store, hash-verified

23 * and holds the connection to the actual data visualized in this window via the pointer to \c AbstractPart.
24 */
25ContentDockWidget::ContentDockWidget(AbstractPart* part)
26 : ads::CDockWidget(part->name())
27 , m_part(part) {
28 setWindowIcon(m_part->icon());
29 setWidget(m_part->view());
30 handleAspectDescriptionChanged(m_part);
31
32 // resize the MDI sub window to fit the content of the view
33 resize(m_part->view()->size());
34
35 // Must be unique and must not be changed after the dock was added to the dockmanager, because
36 // the objectname is used in the content manager map
37 setObjectName(m_part->uuid().toString());
38
39 connect(m_part, &AbstractPart::aspectDescriptionChanged, this, &ContentDockWidget::handleAspectDescriptionChanged);
40 connect(m_part, QOverload<const AbstractAspect*>::of(&AbstractPart::childAspectAboutToBeRemoved), this, &ContentDockWidget::handleAspectAboutToBeRemoved);
41}
42
43ContentDockWidget::~ContentDockWidget() {
44 m_closing = true;

Callers

nothing calls this directly

Calls 6

uuidMethod · 0.80
nameMethod · 0.45
iconMethod · 0.45
viewMethod · 0.45
sizeMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected