Network/IRC/IrcWidget.py

changeset 2258
9ca42fd3ecc0
parent 2256
d07e2e6f3c56
child 2264
d8176c78c6a6
equal deleted inserted replaced
2257:4c3bda2b71f2 2258:9ca42fd3ecc0
8 """ 8 """
9 9
10 import re 10 import re
11 import logging 11 import logging
12 12
13 from PyQt4.QtCore import pyqtSlot, Qt, QByteArray, QTimer 13 from PyQt4.QtCore import pyqtSlot, pyqtSignal, Qt, QByteArray, QTimer
14 from PyQt4.QtGui import QWidget, QToolButton, QLabel 14 from PyQt4.QtGui import QWidget, QToolButton, QLabel
15 from PyQt4.QtNetwork import QTcpSocket, QAbstractSocket 15 from PyQt4.QtNetwork import QTcpSocket, QAbstractSocket
16 try: 16 try:
17 from PyQt4.QtNetwork import QSslSocket, QSslError # __IGNORE_EXCEPTION__ __IGNORE_WARNING__ 17 from PyQt4.QtNetwork import QSslSocket, QSslError # __IGNORE_EXCEPTION__ __IGNORE_WARNING__
18 SSL_AVAILABLE = True 18 SSL_AVAILABLE = True
32 32
33 33
34 class IrcWidget(QWidget, Ui_IrcWidget): 34 class IrcWidget(QWidget, Ui_IrcWidget):
35 """ 35 """
36 Class implementing the IRC window. 36 Class implementing the IRC window.
37
38 @signal autoConnected() emitted after an automatic connection was initiated
37 """ 39 """
40 autoConnected = pyqtSignal()
41
38 ServerDisconnected = 1 42 ServerDisconnected = 1
39 ServerConnected = 2 43 ServerConnected = 2
40 ServerConnecting = 3 44 ServerConnecting = 3
41 45
42 def __init__(self, parent=None): 46 def __init__(self, parent=None):
102 self.networkWidget.editNetwork.connect(self.__editNetwork) 106 self.networkWidget.editNetwork.connect(self.__editNetwork)
103 self.networkWidget.joinChannel.connect(self.__joinChannel) 107 self.networkWidget.joinChannel.connect(self.__joinChannel)
104 self.networkWidget.nickChanged.connect(self.__changeNick) 108 self.networkWidget.nickChanged.connect(self.__changeNick)
105 self.networkWidget.sendData.connect(self.__send) 109 self.networkWidget.sendData.connect(self.__send)
106 self.networkWidget.away.connect(self.__away) 110 self.networkWidget.away.connect(self.__away)
111 self.networkWidget.autoConnected.connect(self.autoConnected)
107 112
108 def shutdown(self): 113 def shutdown(self):
109 """ 114 """
110 Public method to shut down the widget. 115 Public method to shut down the widget.
111 116

eric ide

mercurial