a
    §ˆcð  ã                   @   s~   d Z ddlmZmZmZmZ ddlmZmZm	Z	m
Z
 dZeddddd	d
ddddœƒZG dd„ deƒZeƒ Zedkrze ¡  dS )aN  
Tiny application: convert length measurements from one unit system to another

Select the input and output units using the drop down combo-boxes in the
*Input:* and *Output:* sections respectively. Type the input quantity
to convert into the left most text box. The output value corresponding to the
current input value will automatically be updated in the *Output:*
section.

Use the *Undo* and *ReDo* buttons to undo and redo changes you
have made to any of the input fields.

Note that other than the 'output_amount' property implementation, the rest
of the code is simply declarative.
é    )ÚHasStrictTraitsÚTraitÚCFloatÚProperty)ÚViewÚVGroupÚHGroupÚItemaÜ  
This program converts length measurements from one unit system to another.

Select the input and output units using the drop down combo-boxes in the
*Input:* and *Output:* sections respectively. Type the input quantity
to convert into the left most text box. The output value corresponding to the
current input value will automatically be updated in the *Output:*
section.

Use the *Undo* and *ReDo* buttons to undo and redo changes you
have made to any of the input fields.
ÚinchesgR¸…ëQ@g{®Gáz>@g\�Âõ(ÜV@g33333¥Agš™™™™™¹?g      ð?g      Y@g     jø@)r
   ÚfeetZyardsZmilesZmillimetersZcentimetersZmetersZ
kilometersc                	   @   sž   e Zd Zeddd�Zeddd�Zeg d¢dd�Zed	d
d�Z	e
eeeddd�eddd�ddd�eedddd�eddd�ddd�ed�dg d¢d�Zdd„ ZdS )Ú	Converterg      (@zthe input quantity)Údescr
   zthe input quantity's units)Úinput_amountÚinput_unitsÚoutput_unitszthe output quantity)Zobserver   r   zthe output quantity's unitsr   T)Úspringyr   F)Z
show_labelZInput)ÚlabelZshow_borderÚoutput_amountÚreadonly)Ústyler   r   ZOutput)ÚhelpzUnits Converter)ZUndoÚOKZHelp)ÚtitleZbuttonsc                 C   s   | j | j | j S )N)r   Zinput_units_Zoutput_units_)Úself© r   úp/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/traitsui/examples/demo/Applications/converter.pyÚ_get_output_amounta   s    zConverter._get_output_amountN)Ú__name__Ú
__module__Ú__qualname__r   r   ÚUnitsr   r   r   r   r   r   r   r	   ÚViewHelpZtraits_viewr   r   r   r   r   r   @   s6   þ

ü
üóïr   Ú__main__N)Ú__doc__Z
traits.apir   r   r   r   Ztraitsui.apir   r   r   r	   r!   r    r   Zpopupr   Zconfigure_traitsr   r   r   r   Ú<module>   s&   øþ&