Ë
    JæÂeÐ  ã                   óB   — d Z ddlmZ ddlmZ  G d„ d«      Z e«       Zy)z
Clipboard helper module.
é    )ÚQApplication)Úto_text_stringc                   ó4   — e Zd ZdZdZdZd„ Zdd„Zdd„Zd„ Z	y)ÚClipboardHelperNc                 ón   — t        j                  «       }t        t        |j	                  «       «      «      S ©N)r   Ú	clipboardÚhashr   Útext)Úselfr	   s     ú?/usr/lib/python3/dist-packages/spyder/utils/clipboard_helper.pyÚget_current_hashz ClipboardHelper.get_current_hash   s'   € Ü ×*Ñ*Ó,ˆ	Ü”N 9§>¡>Ó#3Ó4Ó5Ð5ó    c                 óz   — |r|j                  dd|z  «      }t        |«      t        |j                  «       «      z
  S )zGet indentation for given line.ú	ú )ÚreplaceÚlenÚlstrip)r   r   Útab_stop_width_spacess      r   Úget_line_indentationz$ClipboardHelper.get_line_indentation   s5   € á Ø—<‘<  cÐ,AÑ&AÓBˆDÜ4‹yœ˜TŸ[™[›]Ó+Ñ+Ð+r   c                 ój   — | j                  «       | _        | j                  ||«      | _        || _        y)zx
        Save the indentation corresponding to the clipboard data.

        Must be called right after copying.
        N)r   Úmetadata_hashr   Úmetadata_indentÚmetadata_tab_stop_width_spaces)r   Úpreceding_textr   s      r   Úsave_indentationz ClipboardHelper.save_indentation   s6   € ð "×2Ñ2Ó4ˆÔØ#×8Ñ8ØÐ1ó 3ˆÔà.CˆÕ+r   c                 ó   — | j                  «       | j                  k(  r)| j                  || j                  «      | j                  z
  S y)zj
        Get remaining lines adjustments needed to keep multiline
        pasted text consistant.
        r   )r   r   r   r   r   )r   r   s     r   Úremaining_lines_adjustmentz*ClipboardHelper.remaining_lines_adjustment*   sO   € ð
 × Ñ Ó" d×&8Ñ&8Ò8à×)Ñ)Ø"Ø×7Ñ7ó9ð ×&Ñ&ñ'ð(ð
 r   r   )
Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r   © r   r   r   r      s'   „ à€MØ€OØ%)Ð"ò6ó,ó	Dór   r   N)Ú__doc__Úqtpy.QtWidgetsr   Úspyder.py3compatr   r   ÚCLIPBOARD_HELPERr#   r   r   ú<module>r(      s(   ðñõ (å +÷&ñ &ñR #Ó$Ñ r   