Ejemplo n.º 1
0
 def __init__(self, peerName, peerPubKey, listenerStream, reactor):
     QWidget.__init__(self)
     FlashWindow.__init__(self, reactor)
     self.ui = Ui_IMWindow()
     self.ui.setupUi(self)
     self.peerName = peerName
     self.peerPubKey = peerPubKey
     self.listenerStream = listenerStream
     self.reactor = reactor
     self.listenerStream.setCloseCallback(self._onListenerClose)
     self.listenerStream.setErrorCallback(self._onListenerError)
     self.listenerStream.setInputCallback(self._onListenerInput)
     self.connect(self.ui.chatInputEdit, SIGNAL('textChanged()'),
                  self._onChatInputChanged)
     self.baseTitle = self.peerName + ' - ' + str(self.windowTitle())
     self.setWindowTitle(self.baseTitle)
     self.connecting = []
     self.connected = []
     self.pendingMessages = []
     self.lastSentTyping = False
     self.lastSentTypingTime = 0
     self.lastReceivedTyping = False
     self.lastReceivedTypingTime = 0
     self.timerOp = self.reactor.addTimer(1, self._updateTypingStatus)
     self.ui.chatLogView.installEventFilter(self)
     self.ui.chatInputEdit.installEventFilter(self)
Ejemplo n.º 2
0
 def __init__( self, peerName, peerPubKey, listenerStream, reactor ) :
     QWidget.__init__( self )
     FlashWindow.__init__( self, reactor )
     self.ui = Ui_IMWindow()
     self.ui.setupUi( self )
     self.peerName = peerName
     self.peerPubKey = peerPubKey
     self.listenerStream = listenerStream
     self.reactor = reactor
     self.listenerStream.setCloseCallback( self._onListenerClose )
     self.listenerStream.setErrorCallback( self._onListenerError )
     self.listenerStream.setInputCallback( self._onListenerInput )
     self.connect( self.ui.chatInputEdit, SIGNAL('textChanged()'), self._onChatInputChanged )
     self.baseTitle = self.peerName + ' - ' + str(self.windowTitle())
     self.setWindowTitle( self.baseTitle )
     self.connecting = []
     self.connected = []
     self.pendingMessages = []
     self.lastSentTyping = False
     self.lastSentTypingTime = 0
     self.lastReceivedTyping = False
     self.lastReceivedTypingTime = 0
     self.timerOp = self.reactor.addTimer( 1, self._updateTypingStatus )
     self.ui.chatLogView.installEventFilter( self )
     self.ui.chatInputEdit.installEventFilter( self )
Ejemplo n.º 3
0
 def __init__( self, reactor, installCallback ) :
     QWidget.__init__( self )
     self.ui = Ui_UpdateNotifyWindow()
     self.ui.setupUi( self )
     FlashWindow.__init__( self, reactor )
     self.installCallback = installCallback
     self.show()
     self.flash()
Ejemplo n.º 4
0
 def __init__(self, reactor, installCallback):
     QWidget.__init__(self)
     self.ui = Ui_UpdateNotifyWindow()
     self.ui.setupUi(self)
     FlashWindow.__init__(self, reactor)
     self.installCallback = installCallback
     self.show()
     self.flash()
Ejemplo n.º 5
0
 def __init__( self, reactor ) :
     QWidget.__init__( self )
     FlashWindow.__init__( self, reactor )
     self.ui = Ui_FileReceiverWindow()
     self.ui.setupUi( self )
     self.reactor = reactor
     self.setWindowTitle( env.displayName + ' - ' + str(self.windowTitle()) )
     self.connect( self.ui.acceptButton, SIGNAL('clicked()'), self._onAcceptFiles )
     self.connect( self.ui.cancelButton, SIGNAL('clicked()'), self.close )
     tcpConnect( ('127.0.0.1',env.port), self.reactor, self._onConnect )
     self._setStatus( 'Connecting to CSpace...' )
     self.disconnected = False
Ejemplo n.º 6
0
 def __init__(self, reactor):
     QWidget.__init__(self)
     FlashWindow.__init__(self, reactor)
     self.ui = Ui_FileReceiverWindow()
     self.ui.setupUi(self)
     self.reactor = reactor
     self.setWindowTitle(env.displayName + ' - ' + str(self.windowTitle()))
     self.connect(self.ui.acceptButton, SIGNAL('clicked()'),
                  self._onAcceptFiles)
     self.connect(self.ui.cancelButton, SIGNAL('clicked()'), self.close)
     tcpConnect(('127.0.0.1', env.port), self.reactor, self._onConnect)
     self._setStatus('Connecting to CSpace...')
     self.disconnected = False
Ejemplo n.º 7
0
 def __init__( self, user, service, reactor, callback=None ) :
     QtGui.QWidget.__init__( self )
     self.ui = Ui_IncomingPromptWindow()
     self.ui.setupUi( self )
     FlashWindow.__init__( self, reactor )
     msg = 'User <b>%s</b> is accessing service <b>%s</b>.<br/>' % (user,service)
     msg += 'Allow this connection?'
     self.ui.prompt.setText( msg )
     self.connect( self.ui.allowButton, QtCore.SIGNAL('clicked()'), self._onAllow )
     self.connect( self.ui.denyButton, QtCore.SIGNAL('clicked()'), self.close )
     self.op = AsyncOp( callback, self._doCancel )
     self.show()
     self.flash()