Dock Area Module#
- class pyqtgraph.dockarea.DockArea(parent=None, temporary=False, home=None)[source]#
- addDock(dock=None, position='bottom', relativeTo=None, **kwds)[source]#
Adds a dock to this area.
The new Dock object to add. If None, then a new Dock will be created.
‘bottom’, ‘top’, ‘left’, ‘right’, ‘above’, or ‘below’
If relativeTo is None, then the new Dock is added to fill an entire edge of the window. If relativeTo is another Dock, then the new Dock is placed adjacent to it (or in a tabbed configuration for ‘above’ and ‘below’).
All extra keyword arguments are passed to Dock.__init__() if dock is None.
- restoreState(state, missing='error', extra='bottom')[source]#
Restore Dock configuration as generated by saveState.
This function does not create any Docks–it will only restore the arrangement of an existing set of Docks.
By default, docks that are described in state but do not exist in the dock area will cause an exception to be raised. This behavior can be changed by setting missing to ‘ignore’ or ‘create’.
Extra docks that are in the dockarea but that are not mentioned in state will be added to the bottom of the dockarea, unless otherwise specified by the extra argument.
- class pyqtgraph.dockarea.Dock(name, area=None, size=(10, 10), widget=None, hideTitle=False, autoOrientation=True, label=None, **kargs)[source]#
- addWidget(widget, row=None, col=0, rowspan=1, colspan=1)[source]#
Add a new widget to the interior of this Dock. Each Dock uses a QGridLayout to arrange widgets within.
Hide the title bar for this Dock. This will prevent the Dock being moved by the user.
- setOrientation(o='auto', force=False)[source]#
Sets the orientation of the title bar for this Dock. Must be one of ‘auto’, ‘horizontal’, or ‘vertical’. By default (‘auto’), the orientation is determined based on the aspect ratio of the Dock.
- setStretch(x=None, y=None)[source]#
Set the ‘target’ size for this Dock. The actual size will be determined by comparing this Dock’s stretch value to the rest of the docks it shares space with.