...
This commit is contained in:
parent
28a4442f00
commit
4648eaffd5
78
client/pmFile.py
Normal file
78
client/pmFile.py
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Form implementation generated from reading ui file 'pmFile.ui'
|
||||||
|
#
|
||||||
|
# Created: Fri Apr 10 16:31:47 2015
|
||||||
|
# by: PyQt4 UI code generator 4.11.3
|
||||||
|
#
|
||||||
|
# WARNING! All changes made in this file will be lost!
|
||||||
|
|
||||||
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
|
try:
|
||||||
|
_fromUtf8 = QtCore.QString.fromUtf8
|
||||||
|
except AttributeError:
|
||||||
|
def _fromUtf8(s):
|
||||||
|
return s
|
||||||
|
|
||||||
|
try:
|
||||||
|
_encoding = QtGui.QApplication.UnicodeUTF8
|
||||||
|
def _translate(context, text, disambig):
|
||||||
|
return QtGui.QApplication.translate(context, text, disambig, _encoding)
|
||||||
|
except AttributeError:
|
||||||
|
def _translate(context, text, disambig):
|
||||||
|
return QtGui.QApplication.translate(context, text, disambig)
|
||||||
|
|
||||||
|
class Ui_Dialog3(object):
|
||||||
|
def setupUi(self, Dialog3):
|
||||||
|
Dialog3.setObjectName(_fromUtf8("Dialog3"))
|
||||||
|
Dialog3.resize(612, 161)
|
||||||
|
Dialog3.setMaximumSize(QtCore.QSize(612, 161))
|
||||||
|
self.horizontalLayoutWidget = QtGui.QWidget(Dialog3)
|
||||||
|
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(30, 100, 531, 41))
|
||||||
|
self.horizontalLayoutWidget.setObjectName(_fromUtf8("horizontalLayoutWidget"))
|
||||||
|
self.horizontalLayout = QtGui.QHBoxLayout(self.horizontalLayoutWidget)
|
||||||
|
self.horizontalLayout.setMargin(0)
|
||||||
|
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
|
||||||
|
self.lineEdit = QtGui.QLineEdit(self.horizontalLayoutWidget)
|
||||||
|
self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
|
||||||
|
self.horizontalLayout.addWidget(self.lineEdit)
|
||||||
|
self.pushButton = QtGui.QPushButton(self.horizontalLayoutWidget)
|
||||||
|
self.pushButton.setObjectName(_fromUtf8("pushButton"))
|
||||||
|
self.horizontalLayout.addWidget(self.pushButton)
|
||||||
|
self.pushButton_2 = QtGui.QPushButton(self.horizontalLayoutWidget)
|
||||||
|
self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
|
||||||
|
self.horizontalLayout.addWidget(self.pushButton_2)
|
||||||
|
self.horizontalLayoutWidget_2 = QtGui.QWidget(Dialog3)
|
||||||
|
self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(30, 10, 391, 71))
|
||||||
|
self.horizontalLayoutWidget_2.setObjectName(_fromUtf8("horizontalLayoutWidget_2"))
|
||||||
|
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.horizontalLayoutWidget_2)
|
||||||
|
self.horizontalLayout_2.setMargin(0)
|
||||||
|
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
|
||||||
|
self.label = QtGui.QLabel(self.horizontalLayoutWidget_2)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setPointSize(14)
|
||||||
|
font.setBold(True)
|
||||||
|
font.setWeight(75)
|
||||||
|
self.label.setFont(font)
|
||||||
|
self.label.setObjectName(_fromUtf8("label"))
|
||||||
|
self.horizontalLayout_2.addWidget(self.label)
|
||||||
|
self.label_2 = QtGui.QLabel(self.horizontalLayoutWidget_2)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setPointSize(14)
|
||||||
|
font.setBold(True)
|
||||||
|
font.setWeight(75)
|
||||||
|
self.label_2.setFont(font)
|
||||||
|
self.label_2.setObjectName(_fromUtf8("label_2"))
|
||||||
|
self.horizontalLayout_2.addWidget(self.label_2)
|
||||||
|
|
||||||
|
self.retranslateUi(Dialog3)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(Dialog3)
|
||||||
|
|
||||||
|
def retranslateUi(self, Dialog3):
|
||||||
|
Dialog3.setWindowTitle(_translate("Dialog3", "Dialog", None))
|
||||||
|
self.pushButton.setText(_translate("Dialog3", "Send message", None))
|
||||||
|
self.pushButton_2.setText(_translate("Dialog3", "send file", None))
|
||||||
|
self.label.setText(_translate("Dialog3", "Sending a file to : ", None))
|
||||||
|
self.label_2.setText(_translate("Dialog3", "BobZorro", None))
|
||||||
|
|
94
client/pmFile.ui
Normal file
94
client/pmFile.ui
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog3</class>
|
||||||
|
<widget class="QDialog" name="Dialog3">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>612</width>
|
||||||
|
<height>161</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>612</width>
|
||||||
|
<height>161</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>100</y>
|
||||||
|
<width>531</width>
|
||||||
|
<height>41</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEdit"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Send message</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>send file</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>391</width>
|
||||||
|
<height>71</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>14</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Sending a file to : </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>14</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>BobZorro</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
@ -5,6 +5,7 @@ from PySide.QtGui import *
|
|||||||
import time, threading, datetime, time, random,re
|
import time, threading, datetime, time, random,re
|
||||||
from socket import *
|
from socket import *
|
||||||
from pmWindow import Ui_Dialog2
|
from pmWindow import Ui_Dialog2
|
||||||
|
from pmFile import Ui_Dialog3
|
||||||
import configparser
|
import configparser
|
||||||
|
|
||||||
|
|
||||||
@ -44,7 +45,16 @@ class MyThread(QThread):
|
|||||||
def setConfig(self,s,gui):
|
def setConfig(self,s,gui):
|
||||||
self.s = s
|
self.s = s
|
||||||
self.gui = gui
|
self.gui = gui
|
||||||
|
class privateFile () :
|
||||||
|
def __init__(self,main,s):
|
||||||
|
|
||||||
|
self.main = main
|
||||||
|
self.s = s
|
||||||
|
self.g = QtGui.QWidget()
|
||||||
|
self.ui = Ui_Dialog3()
|
||||||
|
self.ui.setupUi(self.g)
|
||||||
|
self.g.show()
|
||||||
|
|
||||||
class privateMessage () :
|
class privateMessage () :
|
||||||
def __init__(self,main,s, pmPerson, pmPerso):
|
def __init__(self,main,s, pmPerson, pmPerso):
|
||||||
|
|
||||||
@ -417,11 +427,12 @@ class start(QtGui.QMainWindow):
|
|||||||
def buttonAMenu(self, pos):
|
def buttonAMenu(self, pos):
|
||||||
menu = QtGui.QMenu()
|
menu = QtGui.QMenu()
|
||||||
menu.addAction('Private discussion', lambda:self.SecondActionButtonA(self.ui.listNames.itemActivated))
|
menu.addAction('Private discussion', lambda:self.SecondActionButtonA(self.ui.listNames.itemActivated))
|
||||||
menu.addAction('Send file', lambda:self.FirstActionButtonA("au revoir"))
|
menu.addAction('Send file', lambda:self.FirstActionButtonA(self.ui.listNames.itemActivated))
|
||||||
menu.exec_(QtGui.QCursor.pos())
|
menu.exec_(QtGui.QCursor.pos())
|
||||||
|
|
||||||
def FirstActionButtonA(self, txt):
|
def FirstActionButtonA(self, txt):
|
||||||
print(txt)
|
#txt = self.ui.listNames.itemActivated.emit(self.ui.listNames.currentItem())
|
||||||
|
self.pf = privateFile(self,self.s)
|
||||||
|
|
||||||
def SecondActionButtonA(self, txt):
|
def SecondActionButtonA(self, txt):
|
||||||
txt = self.ui.listNames.itemActivated.emit(self.ui.listNames.currentItem())
|
txt = self.ui.listNames.itemActivated.emit(self.ui.listNames.currentItem())
|
||||||
|
Reference in New Issue
Block a user