Example #1
0
 def setup_save_timer(self, interval=500):
     """ Initialise the autosave timer.
     :param interval: autosave interval in milliseconds
     :type interval: int
     """
     self.autosave_timer = QtCore.QTimer()
     self.autosave_timer.setSingleShot(True)
     self.autosave_timer.setInterval(interval)
Example #2
0
 def start_timer(self):
     """
     Starts timer for
     self.check_update_globals
     """
     self.timer = QtCore.QTimer()
     self.timer.setInterval(100)
     self.timer.timeout.connect(self.check_update_globals)
     self.timer.start()
Example #3
0
def pythonKnobEdit():
    if nuke.thisKnob().name() == 'showPanel':  # TODO: is there a 'knob added' knobchanged?
        node = nuke.thisNode()
        global timer
        timer = QtCore.QTimer()
        timer.setSingleShot(True)
        timer.setInterval(10)
        timer.timeout.connect(partial(addTextKnobs, node))
        timer.start()
Example #4
0
    def __init__(self):
        super(Terminal, self).__init__()
        self.setReadOnly(True)
        self.setObjectName('Terminal')
        self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)

        self.queue = Queue()
        self.timer = QtCore.QTimer()
        self.timer.timeout.connect(self.check_queue)
        self.timer.setInterval(10)
        self.timer.start()

        self.interval = time.time()