ó
ÉÝ{Tc           @   sË   d  Z  d d l m Z m Z d d l Td d l Z d d l Z d d l Z d e j f d „  ƒ  YZ	 d e j
 f d „  ƒ  YZ d	 e j
 f d
 „  ƒ  YZ d e j f d „  ƒ  YZ d e j f d „  ƒ  YZ d S(   s}  
     qtgui/modelColourGui.py: CCP4MG Molecular Graphics Program
     Copyright (C) 2001-2008 University of York, CCLRC
     Copyright (C) 2009-2010 University of York

     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   QtGuit   QtCore(   t   *Nt   ModelColourEditorc           B   sž   e  Z d  d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d  d „ Z	 i  g  d	 „ Z
 d
 „  Z d d d „ Z d d „ Z d „  Z g  d „ Z RS(   t    c         C   sê  t  j j |  | ƒ | |  _ d  |  _ |  j | j ƒ  d ƒ |  j d | ƒ t  j	 ƒ  } t  j
 ƒ  } | j t  j
 j t  j
 j Bƒ t  j ƒ  } d d  l } | j d t |  j ƒ j d g d d d |  ƒ |  _ |  j j d	 ƒ |  j j d
 ƒ |  j j d ƒ |  j |  j t j d ƒ |  j ƒ | j |  j ƒ t  j t j j ƒ } t  j d ƒ } | j d ƒ |  j | t j d ƒ |  j ƒ | j | t  j j  ƒ t  j d ƒ }	 |	 j d ƒ |  j |	 t j d ƒ |  j! ƒ | j |	 t  j j  ƒ | j | ƒ | j" | ƒ | j | ƒ t  j
 ƒ  }
 |
 j t  j
 j t  j
 j Bƒ t  j	 ƒ  } t  j ƒ  } t  j# d |  ƒ } | j | ƒ t$ j% |  d ƒ } | j d ƒ | j d ƒ | j | ƒ | j& ƒ  | j' | ƒ t$ j( |  d t) d d d d d d d d ƒ|  _* |  j* j+ ƒ  | j |  j* ƒ |
 j" | ƒ | j |
 ƒ |  j" | ƒ |  j |  j* t j d ƒ |  j, ƒ |  j |  j* t j d ƒ |  j- ƒ |  j |  j* t j d ƒ |  j. ƒ |  j j/ ƒ  |  j t0 ƒ  t j d  ƒ |  j1 ƒ | j2 d d ƒ | j2 d d ƒ d  S(!   Nt   colour_editors   Edit colour scheme for iÿÿÿÿt   setst   generict   infot   user_colour_schemest   parentt   lists   Saved colour schemesid   s   doubleClicked(QModelIndex)t   Restores"   Restore the selected colour schemes
   released()t   Deletes!   Delete the selected colour schemes   Default colourt   greyt   default_colours   Colour any non-selected atomst   widgett   ifClosei   t   ifCleart   ifSavet   widthi    s
   accepted()s   close()t   savet   atomContextMenu(3   R    t   QDialogt   __init__t   MolDatat   Nonet   saveGuit   setObjectNamet
   objectNamet   setWindowTitlet   QVBoxLayoutt   QFramet   setFrameStylet   Boxt   Plaint   QHBoxLayoutt   selectionBrowsert   ModelInfoTreet   datat
   name_labelt   list_widgett
   setToolTipt   setFixedHeightt   connectR   t   SIGNALt   restoret	   addWidgett   QDialogButtonBoxt   Qtt   Verticalt   QPushButtont	   addButtont
   ActionRolet   openDeleteGuit	   setLayoutt   QLabelt	   mgWidgetst   mgColourCombot
   addStretcht	   addLayoutt   extendingFramet   ColourEditorLinet   exFramet   showt   applyt   closet   openSaveGuit   populatet
   MAINWINDOWt   atomPickMenut
   setStretch(   t   selfR
   R   t   layoutt   scheme_framet   scheme_layoutR%   t   buttonst   restore_widgett   delete_widgett
   edit_framet   edit_layoutt   line_layoutR   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR   #   sj    		3"
0""""c         C   s6   |  j  t ƒ  t j d ƒ |  j ƒ t j j |  ƒ d  S(   NR   (   t
   disconnectRE   R   R-   RF   t   MGSimpleDialogt   Close(   RH   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyRT   s   s    "c         C   s   |  j  t j d ƒ ƒ d  S(   NRA   (   t   emitR   R-   (   RH   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyRA   }   s    c         C   sŸ   |  j  st d d  l } | j d |  d d d |  j d g ƒ |  _  |  j  j d ƒ |  j |  j  t j d ƒ |  j ƒ n  |  j  j	 ƒ  |  j  j
 ƒ  |  j  j ƒ  d  S(	   NiÿÿÿÿR
   R   R	   R   R   s   Save colour schemeR   (   R   R%   t   ModelInfoSaveR   R   R,   R   R-   R   RD   R@   t   raise_(   RH   R%   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyRC   ƒ   s    	%c      
   C   sÄ   |  j  j ƒ  \ } } | s/ t ƒ  j d ƒ d  S|  j ƒ  } | j d ƒ s^ t ƒ  j d ƒ d  St ƒ  j d | d d d | d | d ƒ } | r¦ t ƒ  j d	 | ƒ n |  j j	 ƒ  |  j  j
 ƒ  d  S(
   Ns/   Please enter a name for the saved colour schemet   colour_ruless-   Error retrieving colour rules - nothing savedt   setR   R	   t   keyt   values   Error saving colour scheme (   R   t   selectedItemt   MGGUIt   WarningMessaget	   getParamst   has_keyt	   MODELINFOt   add_infoR)   RD   RB   (   RH   RY   RZ   t   parst   status(    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR   ‘   s    c         C   sr   |  j  j ƒ  \ } } | s d  Sd d  l } | j |  d | d | d d ƒ} |  j | t j d ƒ |  j  j ƒ d  S(   NiÿÿÿÿRY   t   labelR   R	   t   deleted(   R)   R\   R%   t   ModelInfoDeleteR,   R   R-   RD   (   RH   RY   t   colour_schemeR%   t   gui(    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR6   ¦   s     !c         C   s�   |  j  j ƒ  \ } } | s d  S|  j t j d ƒ | | g ƒ t ƒ  j d | g d | d d ƒ \ } } | r™ | j | ƒ r™ |  j i | | d 6ƒ n  d  S(   Ns$   restore_colour_scheme(PyQt_PyObject)RY   RZ   R   R	   RX   (	   R)   R\   RU   R   R-   Ra   t   get_infoR`   t	   setParams(   RH   RY   Rh   Rd   t   defn(    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR.   ¯   s     *c         C   s\   d d g j  | ƒ rT |  j s" d S|  j j t j | ƒ } | sD d St | j ƒ  ƒ Sd Sd  S(   Nt   save_tot
   save_labelR   (   t   countR   t	   findChildR    t   QWidgett   strt   currentText(   RH   t   nameR   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyt   get¼   s    	  c   	      C   s/  d d  l  } t |  j ƒ } | s% d  S| j d ƒ r+t | d ƒ d k r+|  j t j d ƒ j | d d d ƒ i g  d 6g  d 6} x� | d d D] } d } t	 | d | j
 ƒ rä | j | d ƒ } | d sî | d } qî n
 | d } | d j | d ƒ | d j | ƒ q• W|  j j | ƒ n  d  S(	   NiÿÿÿÿRX   i    R   t   colourt   selection_commandi   R   (   t   typesR'   R   R`   t   lenRp   R9   R:   t
   set_colourt
   isinstancet   ListTypet   list_to_commandt   appendR?   Rk   (	   RH   t   paramst   rulesRx   t   molobjt   exparst   itemt   comt   rv(    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyRk   Ç   s"     %(
 
c   	      C   sç   t  |  j ƒ } | s i  Si  } |  j t j d ƒ j ƒ  } |  j j i g  d 6g  d 6ƒ } | d g g } xp t d t	 | d ƒ ƒ D]U } | j
 | d | ƒ } | d s· | d } n d } | j | d | | g ƒ qƒ Wi | d 6S(   NR   Rw   Rv   R   i    i   RX   (   R'   R   Rp   R9   R:   t
   get_colourR?   R_   t   rangeRy   t   command_to_listR~   (	   RH   R�   Rc   R   R‚   R€   t   iiR…   R„   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR_   ß   s       
i    c         C   sä   | s
 d  S| j  ƒ  g  } | r0 | j d ƒ n  |  j r… t ƒ  j d t |  j ƒ j d d ƒ \ } } | s… | j | j ƒ  ƒ q… n  t ƒ  j d d d d ƒ \ } } | sÂ | j | j ƒ  ƒ n  x | D] } | j | ƒ qÉ Wd  S(   NR   RY   R   R	   R   (	   t   cleart   addItemR   Ra   Rj   R'   R(   t   extendt   keys(   RH   R   t   blankR�   t   retvalRl   Rƒ   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyt   loadSchemesô   s     
 	- ! c         C   s¾   |  j  ƒ  s d  S| j ƒ  } | s& d  S| j |  j k s< d  S| j ƒ  } | sR d  St |  j ƒ  ƒ } t j |  | d | d | d | d | d | d | d g g |  j	 d i | d	 6ƒd  S(
   Ns   Colour thist   range_2t   atomt   residuet   range_1t   SSEt   chainR   t	   pickevent(
   t	   isVisiblet
   getDataObjRt   R   t   getContextMenuRr   R   t   guiUtilst   populateMenut   getActionDef(   RH   R—   t   dobjt   menuRt   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyRF   
  s        c      	   K   sª  | t  t |  j ƒ  ƒ ƒ } | j d d ƒ } | s8 d  S| | j d d ƒ g } | d k r„ t d d d d	 d
 |  j | g d d ƒ S| d k r¸ t d d d d d
 |  j | g d d ƒ S| d k rì t d d d d d
 |  j | g d d ƒ S| d k r t d d d d d
 |  j | g d d ƒ S| d k rTt d d d d d
 |  j | g d d ƒ S| d k r¢t |  d ƒ ssi  St d d |  j d d d
 |  j | g d d ƒ Si  Sd  S(   NR—   R   t   formatt   uniqueR’   t   textt   Atomt   tips   Colour the selected atomt   slott   deleteLateri   R“   t   Residues   Colour the selected residueR–   t   Chains   Colour the selected chainR•   s   Secondary structures'   Colour the selected secondary structureR”   s   Start ranges   Select first residue in a rangeR‘   t   colourPickedRangeStarts   Range from s   Select end residue in a range(	   Ry   Rr   R   Ru   t   getLabelt   dictt   colourPickedAtomt   hasattrR©   (   RH   Rt   R   R—   t   args(    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR�     sL      c         C   s2  | \ } } | d k r! | } n  d d g j  | ƒ rZ t |  j ƒ j d d d | ƒ } ntd g j  | ƒ r� t |  j ƒ j d d d | ƒ } n>| d k r¤t |  j ƒ j d d d | ƒ } t |  j ƒ j |  j ƒ \ } } t |  j ƒ j | ƒ \ } }	 d d  l }
 | d	 k rz| d	 k rz| j |	 j k  rV|  j d
 |
 j | d ƒ d } q›| d
 |
 j |  j d ƒ d } n! |  j d
 |
 j | d ƒ d } |  ` n* | d k rÎt |  j ƒ j	 d | ƒ } n  | d k rç| |  _ d  S|  j
 j ƒ  |  j
 j d i | g d 6d |  j
 j ƒ  d	 ƒ |  j ƒ  d  S(   NR’   R“   R”   t   outt   atomIDR–   R‘   iÿÿÿÿi   t   -t   /R•   t	   atom_nameR   Rw   t   index(   Ro   R'   R   t   convertAtomIDt   interpretResidueIDR©   t   stringR´   t   splitt   getSSER?   t   addLineRk   t   getNofLinesRA   (   RH   R®   Rt   t   atom_idt	   selectiont   res2t   nr1t   pr1t   nr2t   pr2R·   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR¬   H  s4    	$$!!$$!		0N(   t   __name__t
   __module__R   RT   RA   RC   R   R6   R.   Ru   Rk   R_   R   R�   RF   R�   R¬   (    (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR      s   P	
								2R>   c           B   s2   e  Z d d  „ Z d „  Z d „  Z i  d „ Z RS(   c      
   C   s  t  j j |  | ƒ t  j ƒ  } | j d d d d ƒ | j d ƒ t |  j ƒ  j ƒ j	 } t
 j |  | d d d d d d d g ƒ|  _ |  j j d	 ƒ |  j j d
 ƒ | j |  j ƒ t
 j |  d d d ƒ|  _ |  j j d ƒ |  j j d ƒ | j |  j ƒ |  j | ƒ d  S(   Ni    t   selectionWidgetst   namedSelectiont   neighbt   buriedt   secStrt   resTypet   propertyRw   s   Select atoms to be colouredt   redt   browseri   Rv   s   Colour of atoms(   R    Rq   R   R$   t   setContentsMarginst
   setSpacingR'   t   windowR   t	   treeModelR9   t   mgSelectionCombot	   seleComboR   R*   R/   R:   t   colourComboR7   (   RH   R
   RI   t   abstractModel(    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR   v  s    -c         C   s!   |  j  j ƒ  |  j j d ƒ d  S(   NRÌ   (   RÓ   RŠ   RÔ   t	   setColour(   RH   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyt
   setDefault�  s    c         C   sC   i  } |  j  j ƒ  | d <|  j j ƒ  | d <|  j j ƒ  | d <| S(   NRv   Rw   t   selection_params(   RÔ   R†   RÓ   R¢   R_   (   RH   Rc   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR_   •  s
    c         K   sƒ   | j  | ƒ | j d ƒ r3 |  j j | d ƒ n  | j d ƒ rY |  j j | d ƒ n  | j d ƒ r |  j j | d ƒ n  d  S(   NRv   Rw   RØ   (   t   updateR`   RÔ   Rz   RÓ   t   setTextRk   (   RH   R   t   kw(    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyRk   ž  s       N(   RÃ   RÄ   R   R   R×   R_   Rk   (    (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR>   q  s   			t   ColourBlendLinec           B   s   e  Z d d  „ Z d „  Z RS(   c         C   sv  t  j j |  | ƒ t  j ƒ  } | j d d d d ƒ | j d ƒ t | j ƒ j } t	 j
 |  | d d d g ƒ} | j d ƒ | j d ƒ | j | ƒ t	 j |  d ƒ } | j d ƒ | j d	 ƒ | j | ƒ t	 j |  d
 ƒ } | j d ƒ | j d ƒ | j | ƒ t  j |  ƒ } | j d ƒ x! d d g D] } | j | ƒ q4W| j d ƒ | j | ƒ |  j | ƒ d  S(   Ni    t   modelGroupst   peptidet   nucleicRw   s   Select range of residuest   bluet   colour_1s$   Colour of first residue/SSE in rangeRÌ   t   colour_2s#   Colour of last residue/SSE in ranget	   directions   anti-clockwiset	   clockwises;   Direction around colour wheel between first and last colour(   R    Rq   R   R$   RÎ   RÏ   R'   R   RÑ   R9   RÒ   R   R*   R/   R:   t	   QComboBoxR‹   R7   (   RH   R
   RI   RÕ   R   Rƒ   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR   ±  s0    c         C   sq   |  j  t j d ƒ j ƒ  |  j  t j d ƒ j d ƒ |  j  t j d ƒ j d ƒ |  j  t j d ƒ j d ƒ d  S(   NRw   Rá   Rà   Râ   RÌ   Rã   i    (   Rp   R    Rq   RŠ   RÖ   t   setCurrentIndex(   RH   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR×   Ö  s    N(   RÃ   RÄ   R   R   R×   (    (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyRÜ   ¬  s   %t   colourBlendGuic           B   s,   e  Z d d  d „ Z i  d „ Z d „  Z RS(   R   c         C   s�  t  j j |  | ƒ |  j | j ƒ  d ƒ |  j d | ƒ | |  _ t  j ƒ  } t  j ƒ  } t  j	 d |  ƒ } | j d ƒ | j
 d ƒ | j | ƒ t j |  d ƒ } | j d ƒ | j
 d ƒ | j | ƒ | j ƒ  | j | ƒ t j |  d	 t d
 d d d ƒ|  _ | j |  j ƒ |  j j ƒ  |  j | ƒ |  j |  j t j d ƒ t j |  j t j d ƒ ƒ ƒ |  j |  j t j d ƒ |  j ƒ d  S(   Nt   colour_blends   Colour blend through model for s%   Colour secondary structure with turnst   groups"   Colour each helix/stand one colourR   R   s#   Colour for regions not helix/strandR   R   i    R   i   s
   accepted()s   close()(   R    R   R   R   R   R   R   R   R$   t	   QCheckBoxR*   R/   R9   R:   R;   R<   R=   RÜ   R?   R@   R7   R,   R   R-   R›   t   partialRU   RB   (   RH   R
   R   RI   RQ   R   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR   ç  s,    	
$7c         C   s'  | j  d ƒ r= |  j t j d ƒ j | j d ƒ d k ƒ n  | j  d ƒ ro |  j t j d ƒ j | d ƒ n  g  } g  } i  } | j  d ƒ rÜ x2 | d D]& \ } } | j	 | ƒ | j	 | ƒ q› W| | d <| | d <n  x4 d d g D]& } | j  | ƒ ré | | | | <qé qé W|  j
 j | ƒ d  S(	   NRé   R•   R   t   coloursRá   Râ   Rw   Rã   (   R`   Rp   R    Rê   t
   setCheckedRu   R9   R:   Rz   R~   R?   Rk   (   RH   R   Rá   Râ   Rc   t   col1t   col2Rƒ   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyRk   
  s"    .#
 c         C   sõ   i  } |  j  t j d ƒ j ƒ  r. d | d <n
 d | d <|  j  t j d ƒ j ƒ  | d <| j |  j j	 i g  d 6g  d 6g  d 6g  d 6ƒ ƒ g  } xD t
 d	 t | d ƒ ƒ D]) } | j | d | | d | g ƒ q¬ W| | d
 <| d =| d =| S(   NRé   R•   R“   R   Rw   Rá   Râ   Rã   i    Rì   (   Rp   R    Rê   t	   isCheckedR9   R:   R†   RÙ   R?   R_   R‡   Ry   R~   (   RH   Rc   t   colsR‰   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR_   %  s    
5 '
N(   RÃ   RÄ   R   R   Rk   R_   (    (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyRç   á  s   #t   colourInterfaceGuic           B   s,   e  Z d d  d „ Z d „  Z i  d „ Z RS(   R   c         C   s  t  j j |  | ƒ |  j | j ƒ  d ƒ |  j d | ƒ | |  _ t  j ƒ  } t  j ƒ  } t  j	 d |  ƒ } | j
 | ƒ t  j |  ƒ } t  j d |  ƒ } | j d ƒ | j | ƒ | j
 | ƒ t  j d |  ƒ } | j d ƒ | j d ƒ | j | ƒ | j
 | ƒ | j d	 ƒ | j | ƒ t  j ƒ  } t j |  d
 d d d d d g ƒ} | j d ƒ | j
 | ƒ | j | ƒ t  j ƒ  } t  j d |  ƒ } |  j | t j d ƒ t j |  j t j d ƒ ƒ ƒ | j d	 ƒ | j
 | ƒ | j d	 ƒ | j | ƒ t  j ƒ  } |  j | ƒ d  S(   Nt   colour_interfaces   Colour interface for t   Colourt   atomst   atom_burieds   residues by buried areat
   res_buriedi   i   t   multiRÅ   RÆ   RÇ   t   chainst   interface_selectiont   Applys
   released()s
   accepted()(   R    R   R   R   R   R   R   R   R$   R8   R/   t   QButtonGroupt   QRadioButtonR4   Rí   R;   R<   R9   RÒ   R3   R,   R   R-   R›   Rë   RU   R7   (   RH   R
   R   RI   RQ   R   Ré   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR   A  sD    	$4c         C   s}   i  } |  j  t j d ƒ j ƒ  r. d | d <n
 d | d <|  j  t j d ƒ j ƒ  | d <|  j  t j d ƒ j ƒ  j | d <| S(   NR÷   t   RESIDUEt   interface_stylet   ATOMRú   t   interface_MolMata_name(	   Rp   R    Rý   Rð   R9   RÒ   R¢   t   getCurrentDataObjRt   (   RH   R   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyR_   o  s    
"c         K   sÓ   | j  | ƒ | j d ƒ r} | d d k rK |  j t j d ƒ j d ƒ q} | d d k r} |  j t j d ƒ j d ƒ q} n  | j d ƒ rÏ |  j t j d ƒ j | d ƒ |  j t j d	 ƒ j	 | d	 ƒ n  d  S(
   NRÿ   Rþ   R÷   i   R   Rö   t   interface_seletionRú   t   interface_MolData_name(
   RÙ   R`   Rp   R    Rý   Rí   R9   RÒ   RÚ   t   setCurrentDataObj(   RH   R   RÛ   (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyRk   |  s    " N(   RÃ   RÄ   R   R   R_   Rk   (    (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyRò   :  s   .	(   t   __doc__t   PyQt4R    R   t   global_definitionsR›   RS   R9   R   R   Rq   R>   RÜ   Rç   Rò   (    (    (    sA   /opt/xtal/ccp4-6.5-linux32/lib/py2/ccp4mg/qtgui/modelColourGui.pyt   <module>   s   
ÿ U;5Y