%PDF- %PDF-
Direktori : /snap/core/17212/usr/lib/python3/dist-packages/pyudev/__pycache__/ |
Current File : //snap/core/17212/usr/lib/python3/dist-packages/pyudev/__pycache__/pyqt4.cpython-35.pyc |
��P$ � @ s� d Z d d l m Z m Z m Z m Z d d l m Z m Z m Z d d l m Z d d l m Z d d l m Z Gd d � d e e � Z d 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 @ sd e Z d Z d Z e e e � Z e e � Z e e � Z e e � Z e e � Z d d d � Z d S)�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`. Nc C s$ t j | | � | j | t � d S)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 N s zQUDevMonitorObserver.__init__) �__name__� __module__�__qualname__�__doc__r r r ZdeviceEventZdeviceAddedZ deviceRemovedZ deviceChangedZdeviceMovedr r r r r r . s r N)r Z __future__r r r r ZPyQt4.QtCorer r r Zpyudev._utilr Zpyudev.corer Zpyudev._qt_baser r r r r r �<module>! s "