%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/core/17212/usr/lib/python3/dist-packages/pyudev/__pycache__/
Upload File :
Create Path :
Current File : //snap/core/17212/usr/lib/python3/dist-packages/pyudev/__pycache__/pyqt4.cpython-35.pyc



��P$�@s�dZddlmZmZmZmZddlmZmZm	Z	ddl
mZddlm
Z
ddlmZGdd�dee�Zd	S)
a�
    pyudev.pyqt4
    ============

    PyQt4 integration.

    :class:`QUDevMonitorObserver` integrates device monitoring into the PyQt4_
    mainloop by turing device events into Qt signals.

    :mod:`PyQt4.QtCore` from PyQt4_ must be available when importing this
    module.

    .. _PyQt4: http://riverbankcomputing.co.uk/software/pyqt/intro

    .. moduleauthor::  Sebastian Wiesner  <lunaryorn@gmail.com>
�)�print_function�division�unicode_literals�absolute_import)�QSocketNotifier�QObject�
pyqtSignal)�	text_type)�Device)�QUDevMonitorObserverMixinc@sdeZdZdZeee�Zee�Zee�Z	ee�Z
ee�Zddd�ZdS)�QUDevMonitorObservera�
    An observer for device events integrating into the :mod:`PyQt4` mainloop.

    This class inherits :class:`~PyQt4.QtCore.QObject` to turn device events
    into Qt signals:

    >>> from pyudev import Context, Monitor
    >>> from pyudev.pyqt4 import QUDevMonitorObserver
    >>> context = Context()
    >>> monitor = Monitor.from_netlink(context)
    >>> monitor.filter_by(subsystem='input')
    >>> observer = QUDevMonitorObserver(monitor)
    >>> def device_connected(device):
    ...     print('{0!r} added'.format(device))
    >>> observer.deviceAdded.connect(device_connected)
    >>> monitor.start()

    This class is a child of :class:`~PyQt4.QtCore.QObject`.
    NcCs$tj||�|j|t�dS)a
        Observe the given ``monitor`` (a :class:`~pyudev.Monitor`):

        ``parent`` is the parent :class:`~PyQt4.QtCore.QObject` of this
        object.  It is passed unchanged to the inherited constructor of
        :class:`~PyQt4.QtCore.QObject`.
        N)r�__init__Z_setup_notifierr)�selfZmonitor�parent�r�./usr/lib/python3/dist-packages/pyudev/pyqt4.pyr
NszQUDevMonitorObserver.__init__)
�__name__�
__module__�__qualname__�__doc__rr	r
ZdeviceEventZdeviceAddedZ
deviceRemovedZ
deviceChangedZdeviceMovedr
rrrrr.srN)rZ
__future__rrrrZPyQt4.QtCorerrrZpyudev._utilr	Zpyudev.corer
Zpyudev._qt_baserrrrrr�<module>!s"

Zerion Mini Shell 1.0