コード例 #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
ファイル: backend_qt4.py プロジェクト: radford/matplotlib
    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
ファイル: backend_qt5.py プロジェクト: endolith/matplotlib
    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
ファイル: backend_qt4.py プロジェクト: bgamari/matplotlib
 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
ファイル: backend_tkagg.py プロジェクト: astraw/matplotlib
    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
ファイル: backend_gtk3.py プロジェクト: jklymak/matplotlib
    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
ファイル: _backend_tk.py プロジェクト: pwuertz/matplotlib
    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
コード例 #9
0
 def _on_timer(self, dt):
     TimerBase._on_timer(self)
コード例 #10
0
 def _on_timer(self, dt):
     TimerBase._on_timer(self)
コード例 #11
0
ファイル: backend_tkagg.py プロジェクト: astraw/matplotlib
 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
ファイル: backend_qt4.py プロジェクト: qsnake/matplotlib
 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
ファイル: backend_tkagg.py プロジェクト: jgehrcke/matplotlib
 def __init__(self, parent, *args, **kwargs):
     TimerBase.__init__(self, *args, **kwargs)
     self.parent = parent
     self._timer = None
コード例 #19
0
ファイル: backend_qt5.py プロジェクト: azelcer/matplotlib
 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)