AbstractPart
A description for AbstractPart.
-
class AbstractPart : public AbstractAspect
Base class of Aspects with MDI windows as views (AspectParts).
Subclassed by AbstractDataSource, Datapicker, DatapickerImage, HypothesisTest, Note, Notebook, Script, Workbook, Worksheet
Public Functions
-
virtual QWidget *view() const = 0
Construct a primary view on me.
The caller receives ownership of the view.
This method may be called multiple times during the life time of a Part, or it might not get called at all. Parts must not depend on the existence of a view for their operation.
-
void deleteView() const
this function is called when PartMdiView, the mdi-subwindow-wrapper of the actual view, is closed (=deleted) in MainWindow. Makes sure that the view also gets deleted.
-
ContentDockWidget *dockWidget() const
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.
-
virtual QMenu *createContextMenu() override
Return AbstractAspect::createContextMenu() plus operations on the primary view.
-
virtual QWidget *view() const = 0