3
7ßL]Å
  ã               @   s^   d dl mZmZ d dlmZmZmZ d dlmZm	Z	 ddl
mZ eeƒG dd„ de	eƒƒZdS )	é    )ÚQtCoreÚQtGui)ÚIntÚprovidesÚUnicode)ÚIHeadingTextÚMHeadingTexté   )ÚWidgetc                   sH   e Zd ZdZedƒZedƒZ‡ fdd„Zdd„ Z	dd	„ Z
d
d„ Z‡  ZS )ÚHeadingTextzz The toolkit specific implementation of a HeadingText.  See the
    IHeadingText interface for the API documentation.
    r	   ZDefaultc                s    t t| ƒjf |Ž | j|ƒ dS )z Creates the panel. N)Úsuperr   Ú__init__Ú_create_control)ÚselfÚparentZtraits)Ú	__class__© ú>/tmp/pip-install-5sebvq2j/pyface/pyface/ui/qt4/heading_text.pyr   *   s    zHeadingText.__init__c             C   sR   t j|ƒ| _| j| jƒ | jjt jjƒ | jjt jj	ƒ | jj
t jjt jjƒ dS )zA Create the toolkit-specific control that represents the widget. N)r   ZQLabelÚcontrolÚ	_set_textÚtextZsetFrameShapeZQFrameZStyledPanelZsetFrameShadowZRaisedZsetSizePolicyZQSizePolicyZ	PreferredZFixed)r   r   r   r   r   r   7   s    zHeadingText._create_controlc             C   s   d| d }| j j|ƒ dS )z. Set the text on the toolkit specific widget. z<b>z</b>N)r   ZsetText)r   r   r   r   r   r   B   s    zHeadingText._set_textc             C   s   | j dk	r| j|ƒ dS )z" Called when the text is changed. N)r   r   )r   Únewr   r   r   Ú_text_changedL   s    
zHeadingText._text_changed)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úlevelr   r   r   r   r   r   Ú__classcell__r   r   )r   r   r      s   
r   N)Z	pyface.qtr   r   Z
traits.apir   r   r   Zpyface.i_heading_textr   r   Zwidgetr
   r   r   r   r   r   Ú<module>   s
   