Example #1
0
 def __init__ (self, parent = None):
     QTimer.__init__ (self, parent)
     self.startTime = 0
     self.ispaused  = False
     self.interval  = 0
     QTimer.setSingleShot(self,True)
     self.timeout.connect(self._timeend)
Example #2
0
    def __init__(self, callback, interval, keepalive, parent):
        QTimer.__init__(self)
        self.server_up = True
        self.is_visible = False
        self.setInterval(interval)

        self.start_time = None
        self.remaining_time = None

        QObject.connect(self, SIGNAL('timeout()'), callback)
        QObject.connect(keepalive, SIGNAL("keepAliveQuery"), self.pause)
        QObject.connect(keepalive, SIGNAL("serverUp"), self.serverUp)
        QObject.connect(keepalive, SIGNAL("serverDown"), self.serverDown)

        parent.installEventFilter(self)
Example #3
0
    def __init__ ( self, interval, callable, args, kw_args ):
        """ Initializes the object.
        """
        QTimer.__init__( self )

        for timer in self.active_timers:
            if ((timer.callable == callable) and
                (timer.args     == args)     and
                (timer.kw_args  == kw_args)):
                timer.start( interval )
                return

        self.active_timers.append( self )
        self.callable = callable
        self.args     = args
        self.kw_args  = kw_args

        self.connect( self, SIGNAL( 'timeout()' ), self.Notify )

        self.setSingleShot( True )
        self.start( interval )
Example #4
0
    def __init__ ( self ):
        QTimer.__init__( self )

        self.connect( self, SIGNAL('timeout()'), self._dispatch )
        self.start( 125 )