ó
c›V]c           @   sñ  d  Z  d d l m Z d d l Z d d l Z d d l Z d d l Z d d l m Z d e	 f d „  ƒ  YZ
 d e f d	 „  ƒ  YZ d
 Z d g Z d d g Z d g Z d g Z e e j k Z e j j e d ƒ e j e j ƒ  Z e Z e e e e e k st ‚ e Z Z e Z e Z Z Z  e j j! d ƒ d k	 réd e j# k rhe e k r_e n d Z qéd e j# k r’e e k r‰e n d Z qéd e j# k r¼e e k r³e n d Z qéd e j# k rée e k rÝe n d Z qén  e e k rêyÍ d d l$ m% Z& d d l$ m' Z( d Z) e j d k rÁe e j* ƒ  d ƒ Z+ e+ e d ƒ k  re e( ƒ e d ƒ k r»e
 d ƒ ‚ q»n< e+ e d ƒ k  r»e e( ƒ e d ƒ k r»e
 d ƒ ‚ q»n  [+ n  Wqêe, k
 ræd Z e j d
 <qêXn  e e k r»y d d l- m Z) d d l. m Z( d Z& e Z e Z  e j d k r’e e j* ƒ  d ƒ Z+ e+ e d ƒ k  rŒe e( ƒ e d ƒ k rŒe
 d ƒ ‚ qŒn  [+ n  Wq»e, k
 r·d Z e j d
 <q»Xn  e e k rÝyÐ d d l/ Z/ yt e/ j0 d d  ƒ e/ j0 d! d  ƒ e/ j0 d" d  ƒ e/ j0 d# d  ƒ e/ j0 d$ d  ƒ e/ j0 d% d  ƒ e/ j0 d& d  ƒ Wn e1 e2 f k
 rcn Xd d l3 m% Z& d d l3 m' Z( d Z) e Z e Z Wn" e, k
 r»d Z e j d
 <qÝXe& j4 d. ƒ Z e& j4 d) ƒ Z n  e e k rFy: d d l5 m Z) d d l6 m Z( d Z& e Z Z  e Z WqFe, k
 rBe
 d+ ƒ ‚ qFXn  e e k rwe rwe j7 d, j8 e e ƒ e9 ƒ n  i d d 6d d 6d d 6d d 6d d 6e Z: e ríd d l/ Z/ y  e: d- j8 e/ j; d ƒ ƒ 7Z: Wqíe1 k
 réqíXn  d S(/   s’  
**QtPy** is a shim over the various Python Qt bindings. It is used to write
Qt binding indenpendent libraries or applications.

If one of the APIs has already been imported, then it will be used.

Otherwise, the shim will automatically select the first available API (PyQt5,
PySide2, PyQt4 and finally PySide); in that case, you can force the use of one
specific bindings (e.g. if your application is using one specific bindings and
you need to use library that use QtPy) by setting up the ``QT_API`` environment
variable.

PyQt5
=====

For PyQt5, you don't have to set anything as it will be used automatically::

    >>> from qtpy import QtGui, QtWidgets, QtCore
    >>> print(QtWidgets.QWidget)


PySide2
======

Set the QT_API environment variable to 'pyside2' before importing other
packages::

    >>> import os
    >>> os.environ['QT_API'] = 'pyside2'
    >>> from qtpy import QtGui, QtWidgets, QtCore
    >>> print(QtWidgets.QWidget)

PyQt4
=====

Set the ``QT_API`` environment variable to 'pyqt' before importing any python
package::

    >>> import os
    >>> os.environ['QT_API'] = 'pyqt'
    >>> from qtpy import QtGui, QtWidgets, QtCore
    >>> print(QtWidgets.QWidget)

PySide
======

Set the QT_API environment variable to 'pyside' before importing other
packages::

    >>> import os
    >>> os.environ['QT_API'] = 'pyside'
    >>> from qtpy import QtGui, QtWidgets, QtCore
    >>> print(QtWidgets.QWidget)

iÿÿÿÿ(   t   LooseVersionNi   (   t   __version__t   PythonQtErrorc           B   s   e  Z d  Z RS(   s-   Error raise if no bindings could be selected.(   t   __name__t
   __module__t   __doc__(    (    (    s,   lib/python2.7/site-packages/qtpy/__init__.pyR   K   s   t   PythonQtWarningc           B   s   e  Z d  Z RS(   s:   Warning if some features are not implemented in a binding.(   R   R   R   (    (    (    s,   lib/python2.7/site-packages/qtpy/__init__.pyR   P   s   t   QT_APIt   pyqt5t   pyqtt   pyqt4t   pysidet   pyside2t   FORCE_QT_APIt   PyQt5t   PySide2t   PyQt4t   PySide(   t   PYQT_VERSION_STR(   t   QT_VERSION_STRt   darwini    s   10.10s   5.9s\   Qt 5.9 or higher only works in macOS 10.10 or higher. Your program will fail in this system.s   10.11s   5.11s]   Qt 5.11 or higher only works in macOS 10.11 or higher. Your program will fail in this system.t   QStringi   t   QVariantt   QDatet	   QDateTimet   QTextStreamt   QTimet   QUrls   4.4s   4.5s   4.6s   4.7s   No Qt bindings could be founds4   Selected binding "{}" could not be found, using "{}"s    (API v{0})(   s   4.4s   4.5s   4.6s   4.7(<   R   t   distutils.versionR    t   ost   platformt   syst   warningst   _versionR   t   RuntimeErrorR   t   WarningR   R   t	   PYQT5_APIt	   PYQT4_APIt
   PYSIDE_APIt   PYSIDE2_APIt   environt   binding_specifiedt
   setdefaultt   lowert   APIt   initial_apit   AssertionErrort   Falset   is_old_pyqtt	   is_pyqt46t   Truet   PYQT5t   PYQT4t   PYSIDEt   PYSIDE2t   gett   Nonet   modulest   PyQt5.QtCoreR   t   PYQT_VERSIONR   t
   QT_VERSIONt   PYSIDE_VERSIONt   mac_vert   macos_versiont   ImportErrorR   t   PySide2.QtCoret   sipt   setapit   AttributeErrort
   ValueErrort   PyQt4.Qtt
   startswithR   t   PySide.QtCoret   warnt   formatt   RuntimeWarningt   API_NAMEt   getapi(    (    (    s,   lib/python2.7/site-packages/qtpy/__init__.pyt   <module>?   sÐ   				





 