a
    §ˆc4  ã                   @   sr   d dl Z d dlmZmZmZmZmZ d dlmZm	Z	 d dl
mZmZ ddlmZ dZeeƒG dd	„ d	eeƒƒZdS )
é    N)ÚAnyÚCallableÚListÚprovidesÚTuple)ÚQtCoreÚQtGui)ÚIAboutDialogÚMAboutDialogé   )ÚDialogaý  
<html>
  <body>
    <center>
      <table width="100%%" cellspacing="4" cellpadding="0" border="0">
        <tr>
          <td align="center">
          <p>
            <img src="%s" alt="">
          </td>
        </tr>
      </table>

      <p>
      %s<br>
      <br>
      Python %s<br>
      Qt %s<br>
      </p>
      <p>
      %s
      </p>
      <p>
      Copyright &copy; 2003-2022 Enthought, Inc.<br>
      Copyright &copy; 2007 Riverbank Computing Limited
      </p>
  </center>
  </body>
</html>
c                       s>   e Zd ZdZeeeeƒƒZ‡ fdd„Z	dd„ Z
dd„ Z‡  ZS )ÚAboutDialogz{ The toolkit specific implementation of an AboutDialog.  See the
    IAboutDialog interface for the API documentation.
    c                    s.   | j r | j  ¡ \}}| |¡ q tƒ  ¡  d S )N)Ú_connections_to_removeÚpopZ
disconnectÚsuperÚdestroy)ÚselfÚsignalÚhandler©Ú	__class__© ú]/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pyface/ui/qt4/about_dialog.pyr   H   s    zAboutDialog.destroyc                 C   sÈ   t  ¡ }| jdkr:| ¡ d ur,| ¡  ¡ }nd}d| | _| |  ¡ ¡ t  ¡ }| jrl| 	| jt jj
j¡ n| 	t jjj¡ |j |j¡ | j |j|jf¡ t  ¡ }| |¡ | |¡ | |¡ d S )NÚ zAbout %s)r   ZQLabelÚtitleÚparentZwindowTitleZsetTextÚ_create_htmlZQDialogButtonBoxZok_labelZ	addButtonZ
ButtonRoleZ
AcceptRoleZStandardButtonZOkÚacceptedÚconnectÚacceptr   ÚappendZQVBoxLayoutZ	addWidgetZ	setLayout)r   r   Úlabelr   ZbuttonsZlayr   r   r   Ú_create_contentsS   s"    



zAboutDialog._create_contentsc                 C   sJ   | j j}d | j¡}t ¡ }tj}d dd„ | jD ƒ¡}t	|||||f S )Nz<br />c                 S   s   g | ]}d | ‘qS )zCopyright &copy; %sr   )Ú.0Úliner   r   r   Ú
<listcomp>€   ó    z,AboutDialog._create_html.<locals>.<listcomp>)
ÚimageZabsolute_pathÚjoinÚ	additionsÚplatformÚpython_versionr   Ú__version__Ú
copyrightsÚ_DIALOG_TEXT)r   Úpathr)   Ú
py_versionZ
qt_versionr-   r   r   r   r   s   s    ÿûzAboutDialog._create_html)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r"   r   Ú__classcell__r   r   r   r   r   7   s
   	 r   )r*   Z
traits.apir   r   r   r   r   Z	pyface.qtr   r   Zpyface.i_about_dialogr	   r
   Údialogr   r.   r   r   r   r   r   Ú<module>   s    