3
7ßL]  ã               @   s’   d dl mZ d dlmZmZ d dlmZ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dlmZ eeƒG d	d
„ d
eeƒƒZdS )é    )ÚDEBUG)ÚQtCoreÚQtGui)ÚAnyÚBoolÚFontÚInstanceÚIntÚprovides)ÚTupleÚUnicode)ÚISplashScreenÚMSplashScreen)ÚImageResourceé   )ÚWindowc               @   s\   e Zd ZdZeeedƒƒZeeƒZ	e
dƒZeZeZeZeddƒZdd„ Zdd„ Zd	d
„ ZdS )ÚSplashScreenz| The toolkit specific implementation of a SplashScreen.  See the
    ISplashScreen interface for the API documentation.
    ZsplashTé   c             C   s   t j| jjƒ ƒ}| j|ƒ |S )N)r   ZQSplashScreenÚimageZcreate_imageÚ_qt4_show_message)ÚselfÚparentZsplash_screen© r   ú?/tmp/pip-install-5sebvq2j/pyface/pyface/ui/qt4/splash_screen.pyÚ_create_control9   s    
zSplashScreen._create_controlc             C   s   | j dk	r| j| j ƒ dS )z6 Called when the splash screen text has been changed. N)Úcontrolr   )r   r   r   r   Ú_text_changedC   s    
zSplashScreen._text_changedc             C   sN   | j dk	r|j| j ƒ | jdkr*tjj}ntj| jƒ}|j| j	tjj
|ƒ dS )z3 Set the message text for a splash screen control. N)Ú	text_fontZsetFontÚ
text_colorr   ZQtZblackr   ZQColorZshowMessageÚtextZ	AlignLeft)r   r   r   r   r   r   r   I   s    


zSplashScreen._qt4_show_messageN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r	   r   Z	log_levelr   Zshow_log_messagesr   r   r   r   r   r   Ztext_locationr   r   r   r   r   r   r   r      s   

r   N)Úloggingr   Z	pyface.qtr   r   Z
traits.apir   r   r   r   r	   r
   r   r   Zpyface.i_splash_screenr   r   Zpyface.image_resourcer   Zwindowr   r   r   r   r   r   Ú<module>   s    