walouf !
This commit is contained in:
parent
b26a83f81c
commit
7367c7aefa
@ -2,7 +2,7 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'mainWindow.ui'
|
||||
#
|
||||
# Created: Fri Apr 3 22:17:37 2015
|
||||
# Created: Sat Apr 4 00:06:19 2015
|
||||
# by: PyQt4 UI code generator 4.11.3
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
@ -27,14 +27,14 @@ class Ui_Dialog(object):
|
||||
def setupUi(self, Dialog):
|
||||
Dialog.setObjectName(_fromUtf8("Dialog"))
|
||||
Dialog.setEnabled(True)
|
||||
Dialog.resize(814, 557)
|
||||
Dialog.resize(809, 558)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(_fromUtf8("../../../../../../Images/Homer-Simpson-homer-simpson-3065329-800-600.jpg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
Dialog.setWindowIcon(icon)
|
||||
Dialog.setSizeGripEnabled(False)
|
||||
Dialog.setModal(False)
|
||||
self.verticalLayoutWidget = QtGui.QWidget(Dialog)
|
||||
self.verticalLayoutWidget.setGeometry(QtCore.QRect(600, 100, 201, 361))
|
||||
self.verticalLayoutWidget.setGeometry(QtCore.QRect(600, 90, 201, 411))
|
||||
self.verticalLayoutWidget.setObjectName(_fromUtf8("verticalLayoutWidget"))
|
||||
self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget)
|
||||
self.verticalLayout.setMargin(0)
|
||||
@ -52,9 +52,12 @@ class Ui_Dialog(object):
|
||||
self.listNames.setMaximumSize(QtCore.QSize(200, 16777215))
|
||||
self.listNames.setBaseSize(QtCore.QSize(0, 0))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Arial"))
|
||||
font.setFamily(_fromUtf8("Cantarell"))
|
||||
font.setPointSize(14)
|
||||
font.setBold(True)
|
||||
font.setItalic(False)
|
||||
font.setWeight(75)
|
||||
font.setStrikeOut(False)
|
||||
font.setStyleStrategy(QtGui.QFont.PreferAntialias)
|
||||
self.listNames.setFont(font)
|
||||
self.listNames.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
@ -66,8 +69,30 @@ class Ui_Dialog(object):
|
||||
self.listNames.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.listNames.setObjectName(_fromUtf8("listNames"))
|
||||
self.verticalLayout.addWidget(self.listNames)
|
||||
self.listNames_2 = QtGui.QListWidget(self.verticalLayoutWidget)
|
||||
self.listNames_2.setMinimumSize(QtCore.QSize(50, 0))
|
||||
self.listNames_2.setMaximumSize(QtCore.QSize(200, 16777215))
|
||||
self.listNames_2.setBaseSize(QtCore.QSize(0, 0))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Cantarell"))
|
||||
font.setPointSize(14)
|
||||
font.setBold(False)
|
||||
font.setItalic(False)
|
||||
font.setWeight(50)
|
||||
font.setStrikeOut(True)
|
||||
font.setStyleStrategy(QtGui.QFont.PreferAntialias)
|
||||
self.listNames_2.setFont(font)
|
||||
self.listNames_2.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||
self.listNames_2.setAcceptDrops(False)
|
||||
self.listNames_2.setStyleSheet(_fromUtf8(""))
|
||||
self.listNames_2.setFrameShape(QtGui.QFrame.NoFrame)
|
||||
self.listNames_2.setFrameShadow(QtGui.QFrame.Sunken)
|
||||
self.listNames_2.setLineWidth(1)
|
||||
self.listNames_2.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.listNames_2.setObjectName(_fromUtf8("listNames_2"))
|
||||
self.verticalLayout.addWidget(self.listNames_2)
|
||||
self.horizontalLayoutWidget = QtGui.QWidget(Dialog)
|
||||
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(20, 470, 781, 69))
|
||||
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(20, 508, 781, 41))
|
||||
self.horizontalLayoutWidget.setObjectName(_fromUtf8("horizontalLayoutWidget"))
|
||||
self.horizontalLayout = QtGui.QHBoxLayout(self.horizontalLayoutWidget)
|
||||
self.horizontalLayout.setMargin(0)
|
||||
@ -79,7 +104,7 @@ class Ui_Dialog(object):
|
||||
self.pushButton.setObjectName(_fromUtf8("pushButton"))
|
||||
self.horizontalLayout.addWidget(self.pushButton)
|
||||
self.horizontalLayoutWidget_2 = QtGui.QWidget(Dialog)
|
||||
self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(20, 40, 741, 51))
|
||||
self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(20, 30, 781, 51))
|
||||
self.horizontalLayoutWidget_2.setObjectName(_fromUtf8("horizontalLayoutWidget_2"))
|
||||
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.horizontalLayoutWidget_2)
|
||||
self.horizontalLayout_2.setMargin(0)
|
||||
@ -113,7 +138,7 @@ class Ui_Dialog(object):
|
||||
self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
|
||||
self.horizontalLayout_2.addWidget(self.pushButton_2)
|
||||
self.horizontalLayoutWidget_3 = QtGui.QWidget(Dialog)
|
||||
self.horizontalLayoutWidget_3.setGeometry(QtCore.QRect(20, 100, 561, 40))
|
||||
self.horizontalLayoutWidget_3.setGeometry(QtCore.QRect(20, 90, 561, 40))
|
||||
self.horizontalLayoutWidget_3.setObjectName(_fromUtf8("horizontalLayoutWidget_3"))
|
||||
self.horizontalLayout_3 = QtGui.QHBoxLayout(self.horizontalLayoutWidget_3)
|
||||
self.horizontalLayout_3.setMargin(0)
|
||||
@ -122,7 +147,7 @@ class Ui_Dialog(object):
|
||||
self.pushButton_5.setObjectName(_fromUtf8("pushButton_5"))
|
||||
self.horizontalLayout_3.addWidget(self.pushButton_5)
|
||||
self.txtOutput = QtGui.QTextEdit(Dialog)
|
||||
self.txtOutput.setGeometry(QtCore.QRect(20, 160, 561, 291))
|
||||
self.txtOutput.setGeometry(QtCore.QRect(20, 140, 561, 361))
|
||||
self.txtOutput.setMinimumSize(QtCore.QSize(400, 0))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily(_fromUtf8("Arial"))
|
||||
@ -136,7 +161,7 @@ class Ui_Dialog(object):
|
||||
self.txtOutput.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
|
||||
self.txtOutput.setObjectName(_fromUtf8("txtOutput"))
|
||||
self.label_2 = QtGui.QLabel(Dialog)
|
||||
self.label_2.setGeometry(QtCore.QRect(20, 10, 171, 31))
|
||||
self.label_2.setGeometry(QtCore.QRect(20, 0, 171, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(16)
|
||||
font.setBold(True)
|
||||
@ -151,6 +176,7 @@ class Ui_Dialog(object):
|
||||
Dialog.setWindowTitle(_translate("Dialog", "Dialog", None))
|
||||
self.label.setText(_translate("Dialog", "Nick list", None))
|
||||
self.listNames.setSortingEnabled(True)
|
||||
self.listNames_2.setSortingEnabled(True)
|
||||
self.pushButton.setText(_translate("Dialog", "Send message", None))
|
||||
self.label_3.setText(_translate("Dialog", "IP : ", None))
|
||||
self.lineEdit_4.setText(_translate("Dialog", "127.0.0.1", None))
|
||||
|
@ -9,8 +9,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>814</width>
|
||||
<height>557</height>
|
||||
<width>809</width>
|
||||
<height>558</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -30,9 +30,9 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>600</x>
|
||||
<y>100</y>
|
||||
<y>90</y>
|
||||
<width>201</width>
|
||||
<height>361</height>
|
||||
<height>411</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
@ -72,9 +72,69 @@
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Arial</family>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>14</pointsize>
|
||||
<weight>75</weight>
|
||||
<italic>false</italic>
|
||||
<bold>true</bold>
|
||||
<strikeout>false</strikeout>
|
||||
<stylestrategy>PreferAntialias</stylestrategy>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="acceptDrops">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="listNames_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
<pointsize>14</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
<strikeout>true</strikeout>
|
||||
<stylestrategy>PreferAntialias</stylestrategy>
|
||||
</font>
|
||||
</property>
|
||||
@ -110,9 +170,9 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>470</y>
|
||||
<y>508</y>
|
||||
<width>781</width>
|
||||
<height>69</height>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
@ -132,8 +192,8 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>40</y>
|
||||
<width>741</width>
|
||||
<y>30</y>
|
||||
<width>781</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -210,7 +270,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>100</y>
|
||||
<y>90</y>
|
||||
<width>561</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
@ -229,9 +289,9 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>160</y>
|
||||
<y>140</y>
|
||||
<width>561</width>
|
||||
<height>291</height>
|
||||
<height>361</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
@ -274,7 +334,7 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>10</y>
|
||||
<y>0</y>
|
||||
<width>171</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
|
@ -91,10 +91,17 @@ class start(QtGui.QDialog):
|
||||
self.ShowMessageOK("Sucessful logout !")
|
||||
|
||||
if txt.split(" ")[0] == "SUCC_DISABLED" :
|
||||
self.ShowMessageOK("You are AFK !")
|
||||
self.ShowMessageOK("You are AFK !")
|
||||
self.ui.listNames.clear()
|
||||
self.s.send("/userlistaway".encode())
|
||||
#listNames_2
|
||||
|
||||
if txt.split(" ")[0] == "SUCC_ENABLED" :
|
||||
self.ShowMessageOK("You are back !")
|
||||
self.ShowMessageOK("You are back !")
|
||||
self.ui.listNames.clear()
|
||||
self.ui.listNames_2.clear()
|
||||
self.s.send("/userlist".encode())
|
||||
self.s.send("/userlistaway".encode())
|
||||
|
||||
|
||||
if txt.split(" ")[0] == "SUCC_VALID_NICKNAME" :
|
||||
@ -116,9 +123,6 @@ class start(QtGui.QDialog):
|
||||
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" :
|
||||
self.ShowMessageHasJoin(self.pseudo)
|
||||
@ -130,6 +134,12 @@ class start(QtGui.QDialog):
|
||||
self.ui.listNames.addItem(str(txt.split(" ")[i]))
|
||||
print(str(txt.split(" ")[1:]))
|
||||
|
||||
if re.compile('USERAWAY').search(txt.split(" ")[0] ) :
|
||||
n = len(txt.split(" ")[1:]) +1
|
||||
for i in range(1,n) :
|
||||
self.ui.listNames_2.addItem(str(txt.split(" ")[i]))
|
||||
print(str(txt.split(" ")[1:]))
|
||||
|
||||
|
||||
|
||||
if txt.split(" ")[0] == "NEW_MSG" :
|
||||
|
Reference in New Issue
Block a user