예제 #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
예제 #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)
예제 #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()
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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)
예제 #10
0
 def _on_timer(self, dt):
     TimerBase._on_timer(self)
예제 #11
0
 def __init__(self, parent, *args, **kwargs):
     TimerBase.__init__(self, *args, **kwargs)
     self.parent = parent
     self._timer = None
예제 #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)
예제 #13
0
 def __del__(self):
     TimerBase.__del__(self)
     QtCore.QObject.disconnect(self._timer , QtCore.SIGNAL('timeout()'),
         self._on_timer)
예제 #14
0
 def __init__(self, *args, **kwargs):
     self._timer = None
     TimerBase.__init__(self, *args, **kwargs)
예제 #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)
예제 #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)
예제 #17
0
파일: __init__.py 프로젝트: zevlg/itermplot
 def new_timer(self, *args, **kwargs):
     self.timer = TimerBase(*args, **kwargs)
     return self.timer
예제 #18
0
 def __init__(self, parent, *args, **kwargs):
     TimerBase.__init__(self, *args, **kwargs)
     self.parent = parent
     self._timer = None
예제 #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)