ó
ÉÝ{Tc           @   sW   d  Z  d d l m Z m Z m Z d d l Z d d l Z d e j f d „  ƒ  YZ d S(   s›  
     qtgui/HelpAboutDialog.py: CCP4MG Molecular Graphics Program
     Copyright (C) 2001-2008 University of York, CCLRC
     Copyright (C) 2009-2011 University of York
     Copyright (C) 2012 STFC

     This library is free software: you can redistribute it and/or
     modify it under the terms of the GNU Lesser General Public License
     version 3, modified in accordance with the provisions of the 
     license to address the requirements of UK law.
 
     You should have received a copy of the modified GNU Lesser General 
     Public License along with this library.  If not, copies may be 
     downloaded from http://www.ccp4.ac.uk/ccp4license.php
 
     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU Lesser General Public License for more details.
iÿÿÿÿ(   t   QtCoret   QtGuit   QtOpenGLNt   HelpAboutDialogc           B   s   e  Z d  „  Z d d „ Z RS(   c         C   sÀ  t  | d ƒ } | j ƒ  } | j ƒ  d } d } t j d ƒ } | j t ƒ t j | ƒ } t j ƒ  j	 ƒ  } t
 | j ƒ  | j ƒ  ƒ d }	 t
 | j ƒ  | j ƒ  ƒ d }
 x- | D]% } | | 7} t | t | ƒ ƒ } qµ Wt |  d ƒ sÿ t j ƒ  |  _ n  |  j j |  j d ƒ ƒ |  j j | ƒ |  j j | ƒ |  j j t j j ƒ |  j j d ƒ | j d	 ƒ } |  j j t ƒ |  j j t |
 | ƒ t | |	 ƒ ƒ |  j j ƒ  |  j j  ƒ  d  S(
   Nt   rt    i    t   Courieri<   t   licenceTextEdits   CCP4MG LicenceiP   tP   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX(!   t   opent	   readlinest   closeR   t   QFontt   setFixedPitcht   Truet   QFontMetricst   QDesktopWidgett   screenGeometryt   abst   topt   bottomt   leftt   rightt   maxt   lent   hasattrt	   QTextEditR   t   setWindowTitlet   trt   setCurrentFontt   setPlainTextt   setLineWrapModet   FixedColumnWidtht   setLineWrapColumnOrWidtht   widtht   setReadOnlyt   resizet   mint   showt   raise_(   t   selft   urlt   ft   linest   textt	   max_widtht   fontt   fmt   geomt   heightR"   t   lt   max_w(    (    sB   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/HelpAboutDialog.pyt   showLicence   s4    
  
%c         C   s°  t  j  j |  | ƒ d d  l } d } d t j j t j j t j d d ƒ ƒ d } d } t j	 |  ƒ } t j
 t j j t j d d ƒ ƒ } t j |  ƒ } t j |  ƒ }	 t j |  ƒ }
 t j |  ƒ } t j |  ƒ } t j |  ƒ } | j t j j ƒ | j t j j ƒ | j t ƒ | j | ƒ |	 j d	 | j d
 ƒ |
 j d | ƒ | j | ƒ | j |  j d ƒ d ƒ | j | ƒ |  j |  j d ƒ ƒ | j t j j ƒ |	 j t j j ƒ |
 j t j j ƒ | j t j j ƒ | j t j j ƒ | j t j j ƒ | j t ƒ |  j | t j d ƒ |  j ƒ | j | ƒ | j |	 ƒ | j |
 ƒ | j | ƒ | j | ƒ | j | ƒ |  j | ƒ |  j d ƒ |  j  ƒ  d  S(   Niÿÿÿÿs   Copyright (C) 2001-2008 University of York, CCLRC<br>Copyright (C) 2009-2011 University of York<br>Copyright (C) 2012-2013 STFCs	   <a href="t   CCP4MGt   COPYINGs   ">(Licence information)</a>sA   <a href="http://www.ccp4.ac.uk/MG/">http://www.ccp4.ac.uk/MG/</a>s   ccp4mg_icon-64.pngs   <b>CCP4MG v. s    <b>s+   The CCP4 Molecular Graphics Program<br><br>s	   Contact: s   ccp4mg@ysbl.york.ac.uks   About CCP4MGs   linkActivated(const QString&)i    (!   t   MGSimpleDialogt   __init__t   versiont   ost   patht   normpatht   joint   environR   t   QVBoxLayoutt   QPixmapt   QLabelt   setTextInteractionFlagsR    t   Qtt   TextBrowserInteractiont   setOpenExternalLinksR   t	   setPixmapt   setTextt   ccp4mg_versionR   R   t   setAlignmentt   AlignHCentert   Falset   connectt   SIGNALR4   t	   addWidgett	   setLayoutt   setSizeGripEnabledR&   (   R(   t   parentR9   t   copyrightTextt
   licenceUrlR)   t   layoutt   pixmapt   labelt   label2t   label3t   label5t   label6t   label_licence(    (    sB   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/HelpAboutDialog.pyR8   7   sP    0%N(   t   __name__t
   __module__R4   t   NoneR8   (    (    (    sB   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/HelpAboutDialog.pyR      s   	(   t   __doc__t   PyQt4R    R   R   R7   R:   R   (    (    (    sB   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/HelpAboutDialog.pyt   <module>   s   