Debian Codegraph @

doc/api/pyudev.pyside.rst

raw
1 :mod:`pyudev.pyside` – PySide_ integration
2 ==========================================
3
4 .. automodule:: pyudev.pyside
5 :platform: Linux
6 :synopsis: PySide integration
7
8 .. autoclass:: MonitorObserver
9
10 .. automethod:: __init__
11
12 .. attribute:: monitor
13
14 The :class:`~pyudev.Monitor` observed by this object.
15
16 .. attribute:: notifier
17
18 The underlying :class:`QtCore.QSocketNotifier` used to watch the
19 :attr:`monitor`.
20
21 .. autoattribute:: enabled
22
23 .. rubric:: Signals
24
25 This class emits the following Qt signal:
26
27 .. method:: deviceEvent(device)
28
29 Emitted upon any device event.
30
31 ``device`` is the :class:`~pyudev.Device` object describing the device.
32
33 Use :attr:`~pyudev.Device.action` to get the type of event.
34
35
36 Deprecated API
37 --------------
38
39 .. autoclass:: QUDevMonitorObserver
40
41 .. automethod:: __init__
42
43 .. attribute:: monitor
44
45 The :class:`~pyudev.Monitor` observed by this object.
46
47 .. attribute:: notifier
48
49 The underlying :class:`QtCore.QSocketNotifier` used to watch the
50 :attr:`monitor`.
51
52 .. autoattribute:: enabled
53
54 .. rubric:: Signals
55
56 This class emits the following Qt signals:
57
58 .. method:: deviceEvent(action, device)
59
60 Emitted upon any device event. ``action`` is a unicode string
61 containing the action name, and ``device`` is the
62 :class:`~pyudev.Device` object describing the device.
63
64 Basically the arguments of this signal are simply the return value of
65 :meth:`~pyudev.Monitor.receive_device`
66
67 .. method:: deviceAdded(device)
68
69 Emitted if a :class:`~pyudev.Device` is added (e.g a USB device was
70 plugged).
71
72 .. method:: deviceRemoved(device)
73
74 Emitted if a :class:`~pyudev.Device` is removed (e.g. a USB device was
75 unplugged).
76
77 .. method:: deviceChanged(device)
78
79 Emitted if a :class:`~pyudev.Device` was somehow changed (e.g. a
80 change of a property)
81
82 .. method:: deviceMoved(device)
83
84 Emitted if a :class:`~pyudev.Device` was renamed, moved or
85 re-parented.