Dock Area Module#
- class pyqtgraph.dockarea.DockArea(
- parent=None,
- temporary=False,
- home=None,
-
- addDock(
- dock=None,
- position='bottom',
- relativeTo=None,
- **kwds,
Adds a dock to this area.
Arguments:
dock
The new Dock object to add. If None, then a new Dock will be created.
position
‘bottom’, ‘top’, ‘left’, ‘right’, ‘above’, or ‘below’
relativeTo
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',
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,
- addWidget(
- widget,
- row=None,
- col=0,
- rowspan=1,
- colspan=1,
Add a new widget to the interior of this Dock. Each Dock uses a QGridLayout to arrange widgets within.
- hideTitleBar()[source]#
Hide the title bar for this Dock. This will prevent the Dock being moved by the user.
- setOrientation(
- o='auto',
- force=False,
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.