コード例 #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)
コード例 #2
0
ファイル: IM.py プロジェクト: AchillesA/cspace
 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 )
コード例 #3
0
ファイル: dialogs.py プロジェクト: AchillesA/cspace
 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()
コード例 #4
0
ファイル: dialogs.py プロジェクト: hj91/cspace
 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()
コード例 #5
0
ファイル: FileReceiver.py プロジェクト: AchillesA/cspace
 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
コード例 #6
0
ファイル: FileReceiver.py プロジェクト: hj91/cspace
 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
コード例 #7
0
ファイル: incomingprompt.py プロジェクト: hj91/cspace
 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()