def __init__(self, parent, plugin, menu_actions, first=False,
                 register_editorstack_cb=None, unregister_editorstack_cb=None):
        """Create a splitter for dividing an editor window into panels.

        Adds a new EditorStack instance to this splitter.  If it's not
        the first splitter, clones the current EditorStack from the plugin.

        Args:
            parent: Parent widget.
            plugin: Plugin this widget belongs to.
            menu_actions: QActions to include from the parent.
            first: Boolean if this is the first splitter in the editor.
            register_editorstack_cb: Callback to register the EditorStack.
                        Defaults to plugin.register_editorstack() to
                        register the EditorStack with the Editor plugin.
            unregister_editorstack_cb: Callback to unregister the EditorStack.
                        Defaults to plugin.unregister_editorstack() to
                        unregister the EditorStack with the Editor plugin.
        """
        QSplitter.__init__(self, parent)
        self.setAttribute(Qt.WA_DeleteOnClose)
        self.setChildrenCollapsible(False)

        self.toolbar_list = None
        self.menu_list = None

        self.plugin = plugin

        if register_editorstack_cb is None:
            register_editorstack_cb = self.plugin.register_editorstack
        self.register_editorstack_cb = register_editorstack_cb
        if unregister_editorstack_cb is None:
            unregister_editorstack_cb = self.plugin.unregister_editorstack
        self.unregister_editorstack_cb = unregister_editorstack_cb

        self.menu_actions = menu_actions
        self.editorstack = EditorStack(self, menu_actions)
        self.register_editorstack_cb(self.editorstack)
        if not first:
            self.plugin.clone_editorstack(editorstack=self.editorstack)
        self.editorstack.destroyed.connect(lambda: self.editorstack_closed())
        self.editorstack.sig_split_vertically.connect(
                     lambda: self.split(orientation=Qt.Vertical))
        self.editorstack.sig_split_horizontally.connect(
                     lambda: self.split(orientation=Qt.Horizontal))
        self.addWidget(self.editorstack)
def __init__ ( self , parent , plugin , menu_actions , first = False , register_editorstack_cb = None , unregister_editorstack_cb = None ) : QSplitter . __init__ ( self , parent ) self . setAttribute ( Qt . WA_DeleteOnClose ) self . setChildrenCollapsible ( False ) self . toolbar_list = None self . menu_list = None self . plugin = plugin if register_editorstack_cb is None : register_editorstack_cb = self . plugin . register_editorstack self . register_editorstack_cb = register_editorstack_cb if unregister_editorstack_cb is None : unregister_editorstack_cb = self . plugin . unregister_editorstack self . unregister_editorstack_cb = unregister_editorstack_cb self . menu_actions = menu_actions self . editorstack = EditorStack ( self , menu_actions ) self . register_editorstack_cb ( self . editorstack ) if not first : self . plugin . clone_editorstack ( editorstack = self . editorstack ) self . editorstack . destroyed . connect ( lambda : self . editorstack_closed ( ) ) self . editorstack . sig_split_vertically . connect ( lambda : self . split ( orientation = Qt . Vertical ) ) self . editorstack . sig_split_horizontally . connect ( lambda : self . split ( orientation = Qt . Horizontal ) ) self . addWidget ( self . editorstack )
Create a splitter for dividing an editor window into panels.

        Adds a new EditorStack instance to this splitter.  If it's not
        the first splitter, clones the current EditorStack from the plugin.

        Args:
            parent: Parent widget.
            plugin: Plugin this widget belongs to.
            menu_actions: QActions to include from the parent.
            first: Boolean if this is the first splitter in the editor.
            register_editorstack_cb: Callback to register the EditorStack.
                        Defaults to plugin.register_editorstack() to
                        register the EditorStack with the Editor plugin.
            unregister_editorstack_cb: Callback to unregister the EditorStack.
                        Defaults to plugin.unregister_editorstack() to
                        unregister the EditorStack with the Editor plugin.