Exemplo n.º 1
0
 def _on_timer(self):
     TimerBase._on_timer(self)
     if len(self.callbacks) > 0 and not self._single:
         return True
     else:
         self._timer = None
         return False
Exemplo n.º 2
0
    def __init__(self, *args, **kwargs):
        TimerBase.__init__(self, *args, **kwargs)

        # Create a new timer and connect the timeout() signal to the
        # _on_timer method.
        self._timer = QtCore.QTimer()
        QtCore.QObject.connect(self._timer, QtCore.SIGNAL("timeout()"), self._on_timer)
Exemplo n.º 3
0
    def __init__(self, *args, **kwargs):
        TimerBase.__init__(self, *args, **kwargs)

        # Create a new timer and connect the timeout() signal to the
        # _on_timer method.
        self._timer = QtCore.QTimer()
        self._timer.timeout.connect(self._on_timer)
        self._timer_set_interval()
Exemplo n.º 4
0
 def __del__(self):
     # Probably not necessary in practice, but is good behavior to disconnect
     try:
         TimerBase.__del__(self)
         QtCore.QObject.disconnect(self._timer, QtCore.SIGNAL("timeout()"), self._on_timer)
     except RuntimeError:
         # Timer C++ object already deleted
         pass
Exemplo n.º 5
0
 def __del__(self):
     # Probably not necessary in practice, but is good behavior to
     # disconnect
     try:
         TimerBase.__del__(self)
         self._timer.timeout.disconnect(self._on_timer)
     except RuntimeError:
         # Timer C++ object already deleted
         pass
Exemplo n.º 6
0
    def _on_timer(self):
        TimerBase._on_timer(self)

        # Tk after() is only a single shot, so we need to add code here to
        # reset the timer if we're not operating in single shot mode.
        if not self._single and len(self.callbacks) > 0:
            self._timer = self.parent.after(self._interval, self._on_timer)
        else:
            self._timer = None
Exemplo n.º 7
0
    def _on_timer(self):
        TimerBase._on_timer(self)

        # Gtk timeout_add() requires that the callback returns True if it
        # is to be called again.
        if self.callbacks and not self._single:
            return True
        else:
            self._timer = None
            return False
Exemplo n.º 8
0
    def _on_timer(self):
        TimerBase._on_timer(self)

        # Tk after() is only a single shot, so we need to add code here to
        # reset the timer if we're not operating in single shot mode.  However,
        # if _timer is None, this means that _timer_stop has been called; so
        # don't recreate the timer in that case.
        if not self._single and self._timer:
            self._timer = self.parent.after(self._interval, self._on_timer)
        else:
            self._timer = None
 def _on_timer(self, dt):
     TimerBase._on_timer(self)
Exemplo n.º 10
0
 def _on_timer(self, dt):
     TimerBase._on_timer(self)
Exemplo n.º 11
0
 def __init__(self, parent, *args, **kwargs):
     TimerBase.__init__(self, *args, **kwargs)
     self.parent = parent
     self._timer = None
Exemplo n.º 12
0
 def __del__(self):
     # Probably not necessary in practice, but is good behavior to disconnect
     TimerBase.__del__(self)
     QtCore.QObject.disconnect(self._timer, QtCore.SIGNAL('timeout()'),
                               self._on_timer)
Exemplo n.º 13
0
 def __del__(self):
     TimerBase.__del__(self)
     QtCore.QObject.disconnect(self._timer , QtCore.SIGNAL('timeout()'),
         self._on_timer)
Exemplo n.º 14
0
 def __init__(self, *args, **kwargs):
     self._timer = None
     TimerBase.__init__(self, *args, **kwargs)
Exemplo n.º 15
0
 def __init__(self, *args, **kwargs):
     TimerBase.__init__(self, *args, **kwargs)
     self._timer = QtCore.QTimer()
     QtCore.QObject.connect(self._timer, QtCore.SIGNAL('timeout()'),
         self._on_timer)
Exemplo n.º 16
0
 def __del__(self):
     # Probably not necessary in practice, but is good behavior to disconnect
     TimerBase.__del__(self)
     QtCore.QObject.disconnect(self._timer , QtCore.SIGNAL('timeout()'),
         self._on_timer)
Exemplo n.º 17
0
 def new_timer(self, *args, **kwargs):
     self.timer = TimerBase(*args, **kwargs)
     return self.timer
Exemplo n.º 18
0
 def __init__(self, parent, *args, **kwargs):
     TimerBase.__init__(self, *args, **kwargs)
     self.parent = parent
     self._timer = None
Exemplo n.º 19
0
 def __init__(self, *args, **kwargs):
     # Create a new timer and connect the timeout() signal to the
     # _on_timer method.
     self._timer = QtCore.QTimer()
     self._timer.timeout.connect(self._on_timer)
     TimerBase.__init__(self, *args, **kwargs)