turie 3 !
This commit is contained in:
parent
4feefdd4aa
commit
b26a83f81c
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Form implementation generated from reading ui file 'mainWindow.ui'
|
# Form implementation generated from reading ui file 'mainWindow.ui'
|
||||||
#
|
#
|
||||||
# Created: Fri Apr 3 20:01:13 2015
|
# Created: Fri Apr 3 22:17:37 2015
|
||||||
# by: PyQt4 UI code generator 4.11.3
|
# by: PyQt4 UI code generator 4.11.3
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
@ -26,12 +26,15 @@ except AttributeError:
|
|||||||
class Ui_Dialog(object):
|
class Ui_Dialog(object):
|
||||||
def setupUi(self, Dialog):
|
def setupUi(self, Dialog):
|
||||||
Dialog.setObjectName(_fromUtf8("Dialog"))
|
Dialog.setObjectName(_fromUtf8("Dialog"))
|
||||||
Dialog.resize(774, 540)
|
Dialog.setEnabled(True)
|
||||||
|
Dialog.resize(814, 557)
|
||||||
icon = QtGui.QIcon()
|
icon = QtGui.QIcon()
|
||||||
icon.addPixmap(QtGui.QPixmap(_fromUtf8("../../../../../../Images/Homer-Simpson-homer-simpson-3065329-800-600.jpg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
icon.addPixmap(QtGui.QPixmap(_fromUtf8("../../../../../../Images/Homer-Simpson-homer-simpson-3065329-800-600.jpg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
Dialog.setWindowIcon(icon)
|
Dialog.setWindowIcon(icon)
|
||||||
|
Dialog.setSizeGripEnabled(False)
|
||||||
|
Dialog.setModal(False)
|
||||||
self.verticalLayoutWidget = QtGui.QWidget(Dialog)
|
self.verticalLayoutWidget = QtGui.QWidget(Dialog)
|
||||||
self.verticalLayoutWidget.setGeometry(QtCore.QRect(600, 100, 160, 361))
|
self.verticalLayoutWidget.setGeometry(QtCore.QRect(600, 100, 201, 361))
|
||||||
self.verticalLayoutWidget.setObjectName(_fromUtf8("verticalLayoutWidget"))
|
self.verticalLayoutWidget.setObjectName(_fromUtf8("verticalLayoutWidget"))
|
||||||
self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget)
|
self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget)
|
||||||
self.verticalLayout.setMargin(0)
|
self.verticalLayout.setMargin(0)
|
||||||
@ -64,7 +67,7 @@ class Ui_Dialog(object):
|
|||||||
self.listNames.setObjectName(_fromUtf8("listNames"))
|
self.listNames.setObjectName(_fromUtf8("listNames"))
|
||||||
self.verticalLayout.addWidget(self.listNames)
|
self.verticalLayout.addWidget(self.listNames)
|
||||||
self.horizontalLayoutWidget = QtGui.QWidget(Dialog)
|
self.horizontalLayoutWidget = QtGui.QWidget(Dialog)
|
||||||
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(20, 470, 741, 69))
|
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(20, 470, 781, 69))
|
||||||
self.horizontalLayoutWidget.setObjectName(_fromUtf8("horizontalLayoutWidget"))
|
self.horizontalLayoutWidget.setObjectName(_fromUtf8("horizontalLayoutWidget"))
|
||||||
self.horizontalLayout = QtGui.QHBoxLayout(self.horizontalLayoutWidget)
|
self.horizontalLayout = QtGui.QHBoxLayout(self.horizontalLayoutWidget)
|
||||||
self.horizontalLayout.setMargin(0)
|
self.horizontalLayout.setMargin(0)
|
||||||
|
@ -2,12 +2,15 @@
|
|||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>Dialog</class>
|
<class>Dialog</class>
|
||||||
<widget class="QDialog" name="Dialog">
|
<widget class="QDialog" name="Dialog">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>774</width>
|
<width>814</width>
|
||||||
<height>540</height>
|
<height>557</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -17,12 +20,18 @@
|
|||||||
<iconset>
|
<iconset>
|
||||||
<normaloff>../../../../../../Images/Homer-Simpson-homer-simpson-3065329-800-600.jpg</normaloff>../../../../../../Images/Homer-Simpson-homer-simpson-3065329-800-600.jpg</iconset>
|
<normaloff>../../../../../../Images/Homer-Simpson-homer-simpson-3065329-800-600.jpg</normaloff>../../../../../../Images/Homer-Simpson-homer-simpson-3065329-800-600.jpg</iconset>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeGripEnabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="modal">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<widget class="QWidget" name="verticalLayoutWidget">
|
<widget class="QWidget" name="verticalLayoutWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>600</x>
|
<x>600</x>
|
||||||
<y>100</y>
|
<y>100</y>
|
||||||
<width>160</width>
|
<width>201</width>
|
||||||
<height>361</height>
|
<height>361</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -102,7 +111,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>20</x>
|
<x>20</x>
|
||||||
<y>470</y>
|
<y>470</y>
|
||||||
<width>741</width>
|
<width>781</width>
|
||||||
<height>69</height>
|
<height>69</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -84,7 +84,7 @@ class start(QtGui.QDialog):
|
|||||||
if re.match("^ERR_", txt):
|
if re.match("^ERR_", txt):
|
||||||
self.ShowMessageErreur("Erreur !")
|
self.ShowMessageErreur("Erreur !")
|
||||||
|
|
||||||
self.message_buffer += '<br> <span style="color : #E6E6E6"> '+ txt.split(" ")[0] +' </span>'
|
self.message_buffer += '<br> <span style="color : #E6E6E6"> '+ txt +' </span>'
|
||||||
|
|
||||||
|
|
||||||
if txt.split(" ")[0] == "SUCCESSFUL_LOGOUT" :
|
if txt.split(" ")[0] == "SUCCESSFUL_LOGOUT" :
|
||||||
@ -101,15 +101,35 @@ class start(QtGui.QDialog):
|
|||||||
self.ShowMessageOK("Sucessful nickname change !")
|
self.ShowMessageOK("Sucessful nickname change !")
|
||||||
|
|
||||||
|
|
||||||
|
#HAS_LEFT anonymous52
|
||||||
if txt.split(" ")[0] == "NAME_CHANGED" :
|
if txt.split(" ")[0] == "NAME_CHANGED" :
|
||||||
self.ShowMessageNameChange(txt.split(" ")[1], txt.split(" ")[2])
|
self.ShowMessageNameChange(txt.split(" ")[1], txt.split(" ")[2])
|
||||||
|
self.ui.listNames.clear()
|
||||||
|
self.s.send("/userlist".encode())
|
||||||
|
|
||||||
if txt.split(" ")[0] == "HAS_JOIN" :
|
if txt.split(" ")[0] == "HAS_JOIN" :
|
||||||
self.ShowMessageHasJoin(txt.split(" ")[1])
|
self.ShowMessageHasJoin(txt.split(" ")[1])
|
||||||
|
self.ui.listNames.addItem(txt.split(" ")[1])
|
||||||
|
|
||||||
|
if txt.split(" ")[0] == "HAS_LEFT" :
|
||||||
|
self.ShowMessageHasLeft(txt.split(" ")[1])
|
||||||
|
self.ui.listNames.clear()
|
||||||
|
self.s.send("/userlist".encode())
|
||||||
|
|
||||||
|
#self.ui.listNames.removeItemWidget(1)
|
||||||
|
#self.ui.listNames.addItem(txt.split(" ")[1])
|
||||||
|
|
||||||
|
|
||||||
if txt.split(" ")[0] == "SUCC_CHANNEL_JOINED" or txt.split(" ")[0] == "SUCC_CHANNEL_JOINEDUSERLIST" :
|
if txt.split(" ")[0] == "SUCC_CHANNEL_JOINED" or txt.split(" ")[0] == "SUCC_CHANNEL_JOINEDUSERLIST" :
|
||||||
self.ShowMessageHasJoin(self.pseudo)
|
self.ShowMessageHasJoin(self.pseudo)
|
||||||
|
|
||||||
|
|
||||||
|
if re.compile('USERLIST').search(txt.split(" ")[0] ) :
|
||||||
|
n = len(txt.split(" ")[1:]) +1
|
||||||
|
for i in range(1,n) :
|
||||||
|
self.ui.listNames.addItem(str(txt.split(" ")[i]))
|
||||||
|
print(str(txt.split(" ")[1:]))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if txt.split(" ")[0] == "NEW_MSG" :
|
if txt.split(" ")[0] == "NEW_MSG" :
|
||||||
@ -122,6 +142,9 @@ class start(QtGui.QDialog):
|
|||||||
def ShowMessageHasJoin (self, txt) :
|
def ShowMessageHasJoin (self, txt) :
|
||||||
self.message_buffer += '<br> <span style="color : #FF00FF; font-weight: bold;"> '+ self.htmlToText(txt) +' has joined DNC </span>'
|
self.message_buffer += '<br> <span style="color : #FF00FF; font-weight: bold;"> '+ self.htmlToText(txt) +' has joined DNC </span>'
|
||||||
|
|
||||||
|
def ShowMessageHasLeft (self, txt) :
|
||||||
|
self.message_buffer += '<br> <span style="color : #FF00FF; font-weight: bold;"> '+ self.htmlToText(txt) +' has left DNC </span>'
|
||||||
|
|
||||||
def ShowMessageNameChange (self, txt, txt2) :
|
def ShowMessageNameChange (self, txt, txt2) :
|
||||||
self.message_buffer += '<br> <span style="color : #FF00FF; font-weight: bold;"> '+ self.htmlToText(txt) +' is now : '+self.htmlToText(txt2)+' </span>'
|
self.message_buffer += '<br> <span style="color : #FF00FF; font-weight: bold;"> '+ self.htmlToText(txt) +' is now : '+self.htmlToText(txt2)+' </span>'
|
||||||
|
|
||||||
@ -181,6 +204,8 @@ class start(QtGui.QDialog):
|
|||||||
try:
|
try:
|
||||||
self.s.send(cmdChange.encode())
|
self.s.send(cmdChange.encode())
|
||||||
self.pseudo = changePseudo
|
self.pseudo = changePseudo
|
||||||
|
self.ui.listNames.clear()
|
||||||
|
self.s.send("/userlist".encode())
|
||||||
|
|
||||||
|
|
||||||
except timeout:
|
except timeout:
|
||||||
|
Reference in New Issue
Block a user