ó
ø`9Sc           @   s'   d  Z  d d l Td d d „  ƒ  YZ d S(   s<   Miscellaneous not GUI-related utility classes and functions.iÿÿÿÿ(   t   *t   SettingsGrouperc           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s:  Utility class that may be used with 'with' statement to safely manage
    settings grouping via 'beginGroup' and 'endGroup' for a given 'QSettings'
    instance.

    Pass the 'QSettings' instance and the name of the group to the constructor,
    and use the returned instance as the argument for 'with' statement.c         C   s   | |  _  | |  _ d  S(   N(   t   settingst	   groupName(   t   selfR   R   (    (    s   code\common\utils\utils.pyt   __init__   s    	c         C   s   |  j  j |  j ƒ d  S(   N(   R   t
   beginGroupR   (   R   (    (    s   code\common\utils\utils.pyt	   __enter__#   s    c         C   s   |  j  j ƒ  d  S(   N(   R   t   endGroup(   R   t   excTypet   excValuet	   traceback(    (    s   code\common\utils\utils.pyt   __exit__&   s    (   t   __name__t
   __module__t   __doc__R   R   R   (    (    (    s   code\common\utils\utils.pyR      s   		N(    (   R   t   PyQt4.QtCoreR   (    (    (    s   code\common\utils\utils.pyt   <module>   s   
