
    G@d                     ^    d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	  G d dee	e          Z
dS )	z
Main container widget.

SpyderPluginV2 plugins must provide a CONTAINER_CLASS attribute that is a
subclass of PluginMainContainer, if they provide additional widgets like
status bar widgets or toolbars.
    )PYQT5)Signal)QWidget)SpyderToolbarMixinSpyderWidgetMixinc                        e Zd ZdZdZ	  e            Z	  e            Z	  e            Z	  ee	          Z
	  ee          Z	  edef          Z	 d	 fd	Z fdZd Zd Zd Z xZS )
PluginMainContaineraS  
    Spyder plugin main container class.

    This class handles a non-dockable widget to be able to contain, parent and
    store references to other widgets, like status bar widgets, toolbars,
    context menus, etc.

    Notes
    -----
    All Spyder non dockable plugins can define a plugin container that must
    subclass this.
    N c                 @   t           r$t                                          ||           n+t          j        | |           t	          j        | |           || _        || _        || _        || _        | 	                    d           | 
                    d           d S )N)parentclass_parent)r   r   )r   super__init__r   r   _name_plugin_parentPLUGIN_NAMEsetMaximumWidthsetMaximumHeight)selfnamepluginr   	__class__s       Alib/python3.11/site-packages/spyder/api/widgets/main_container.pyr   zPluginMainContainer.__init__s   s     	BGGF@@@@T6***&t&AAAA 
   	Qa         c                 r    |                                   t                                          |           d S N)on_closer   
closeEvent)r   eventr   s     r   r   zPluginMainContainer.closeEvent   s.    5!!!!!r   c                      t          d          )zT
        Create actions, widgets, add to menu and other setup requirements.
        z<A PluginMainContainer subclass must define a `setup` method!NotImplementedErrorr   s    r   setupzPluginMainContainer.setup   s     "JL L 	Lr   c                      t          d          )z
        Update the state of exposed actions.

        Exposed actions are actions created by the self.create_action method.
        zEA PluginMainContainer subclass must define a `update_actions` method!r"   r$   s    r   update_actionsz"PluginMainContainer.update_actions   s     "  	r   c                     dS )z
        Perform actions before the container is closed.

        This method **must** only operate on local attributes.
        Nr
   r$   s    r   r   zPluginMainContainer.on_close   s	     	r   r   )__name__
__module____qualname____doc__CONTEXT_NAMEr   sig_free_memory_requestedsig_quit_requestedsig_restart_requestedboolsig_redirect_stdio_requesteddictsig_exception_occurredobjectsig_unmaximize_plugin_requestedr   r   r%   r'   r   __classcell__)r   s   @r   r	   r	      s         L !'
   #FHH $*6$<<  $VD\\8 '-fR&&;&;#! ! ! ! ! !:" " " " "L L L        r   r	   N)r,   qtpyr   qtpy.QtCorer   qtpy.QtWidgetsr   spyder.api.widgets.mixinsr   r   r	   r
   r   r   <module>r<      s                 " " " " " " K K K K K K K KW W W W W'#46H W W W W Wr   