mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
enhanced signal dictionary creating
This commit is contained in:
parent
744a606d69
commit
6285149489
1 changed files with 2 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
import time
|
import time
|
||||||
|
import collections
|
||||||
from Qt import QtCore, QtGui, QtWidgets
|
from Qt import QtCore, QtGui, QtWidgets
|
||||||
from pype.vendor.pynput import mouse, keyboard
|
from pype.vendor.pynput import mouse, keyboard
|
||||||
from pypeapp import Logger
|
from pypeapp import Logger
|
||||||
|
|
@ -9,7 +10,7 @@ class IdleManager(QtCore.QThread):
|
||||||
Idle time resets on keyboard/mouse input.
|
Idle time resets on keyboard/mouse input.
|
||||||
Is able to emit signals at specific time idle.
|
Is able to emit signals at specific time idle.
|
||||||
"""
|
"""
|
||||||
time_signals = {}
|
time_signals = collections.defaultdict(list)
|
||||||
idle_time = 0
|
idle_time = 0
|
||||||
signal_reset_timer = QtCore.Signal()
|
signal_reset_timer = QtCore.Signal()
|
||||||
|
|
||||||
|
|
@ -35,8 +36,6 @@ class IdleManager(QtCore.QThread):
|
||||||
:param signal: signal that will be emitted (without objects)
|
:param signal: signal that will be emitted (without objects)
|
||||||
:type signal: QtCore.Signal
|
:type signal: QtCore.Signal
|
||||||
"""
|
"""
|
||||||
if emit_time not in self.time_signals:
|
|
||||||
self.time_signals[emit_time] = []
|
|
||||||
self.time_signals[emit_time].append(signal)
|
self.time_signals[emit_time].append(signal)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue