3
8ßL]\  ã               @   st   d Z ddlmZ ddlm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.
é    )Úabsolute_import)ÚQtGui)ÚStr)ÚToolkitEditorFactoryé   )ÚEditorc                   s4   e Zd ZdZeZdd„ Zdd„ Z‡ fdd„Z‡  Z	S )ÚCompoundEditorzw Editor for compound traits, which displays editors for each of the
    combined traits, in the appropriate style.
    c             C   sˆ   t jƒ | _t j| jƒ}|jddddƒ g  | _}xR| jjD ]F}t|| j	ƒ| j
| j| j| jdƒ}|j| jƒ |j|jƒ |j|ƒ q:W dS )za Finishes initializing the editor by creating the underlying toolkit
            widget.
        r   N)r   ZQWidgetÚcontrolZQVBoxLayoutZsetContentsMarginsÚ_editorsÚfactoryÚeditorsÚgetattrÚkindÚuiÚobjectÚnameÚdescriptionÚprepareZ	addWidgetÚappend)ÚselfÚparentZlayoutr   r   Úeditor© r   úB/tmp/pip-install-5sebvq2j/traitsui/traitsui/qt4/compound_editor.pyÚinit9   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_editorT   s    zCompoundEditor.update_editorc                s*   x| j D ]}|jƒ  qW tt| ƒjƒ  dS )z0 Disposes of the contents of an editor.
        N)r
   ÚdisposeÚsuperr   )r   r   )Ú	__class__r   r   r   ^   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$   k   s   r$   c               @   s   e Zd ZdZdS )ÚCustomEditorZcustom_editorN)r   r    r!   r   r   r   r   r   r%   v   s   r%   N)r"   Ú
__future__r   Z	pyface.qtr   Z
traits.apir   Z traitsui.editors.compound_editorr   r   r   r   r$   r%   r   r   r   r   Ú<module>   s   B