a
    §ˆcö
  ã                   @   s\   d Z ddlmZ ddlmZ ddlmZ G dd„ deƒZG dd	„ d	eƒZG d
d„ deƒZ	dS )zb Defines the compound editor and the compound editor factory for the
PyQt user interface toolkit.
é    )ÚQtGui)ÚStré   )ÚEditorc                       s6   e Zd ZdZeƒ Zdd„ Zdd„ Z‡ fdd„Z‡  Z	S )ÚCompoundEditorzvEditor for compound traits, which displays editors for each of the
    combined traits, in the appropriate style.
    c                 C   s„   t  ¡ | _t  | j¡}| dddd¡ g  | _}| jjD ]F}t|| j	ƒ| j
| j| j| jdƒ}| | j¡ | |j¡ | |¡ q8dS )z\Finishes initializing the editor by creating the underlying toolkit
        widget.
        r   N)r   ZQWidgetÚcontrolZQVBoxLayoutZsetContentsMarginsÚ_editorsÚfactoryÚeditorsÚgetattrÚkindZuiÚobjectÚnameÚdescriptionÚprepareZ	addWidgetÚappend)ÚselfÚparentZlayoutr
   r	   Úeditor© r   ú_/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/traitsui/qt4/compound_editor.pyÚinit/   s    


ÿzCompoundEditor.initc                 C   s   dS )z[Updates the editor when the object trait changes externally to the
        editor.
        Nr   )r   r   r   r   Úupdate_editorA   s    zCompoundEditor.update_editorc                    s"   | j D ]}| ¡  qtƒ  ¡  dS )z&Disposes of the contents of an editor.N)r   ÚdisposeÚsuper)r   r   ©Ú	__class__r   r   r   G   s    

zCompoundEditor.dispose)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   Ú__classcell__r   r   r   r   r   #   s
   	r   c                   @   s   e Zd ZdZdS )ÚSimpleEditorZsimple_editorN©r   r   r   r   r   r   r   r   r"   O   s   r"   c                   @   s   e Zd ZdZdS )ÚCustomEditorZcustom_editorNr#   r   r   r   r   r$   V   s   r$   N)
r    Z	pyface.qtr   Z
traits.apir   r   r   r   r"   r$   r   r   r   r   Ú<module>   s   ,