menu updates
This commit is contained in:
parent
be5e77c4fd
commit
deb35b5404
129
src/menu.py
129
src/menu.py
@ -2,7 +2,7 @@ from PySide import QtCore, QtGui
|
||||
|
||||
|
||||
class AddContact(QtGui.QWidget):
|
||||
"""Add contact form """
|
||||
"""Add contact form"""
|
||||
|
||||
def __init__(self):
|
||||
super(AddContact, self).__init__()
|
||||
@ -47,10 +47,135 @@ class AddContact(QtGui.QWidget):
|
||||
self.label.setText(QtGui.QApplication.translate('AddContact', "TOX ID:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label_2.setText(QtGui.QApplication.translate('AddContact', "Message:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
||||
|
||||
class ProfileSettings(QtGui.QWidget):
|
||||
"""Form with profile settings such as name, status, TOX ID"""
|
||||
def __init__(self):
|
||||
super(ProfileSettings, self).__init__()
|
||||
self.initUI()
|
||||
|
||||
def initUI(self):
|
||||
self.setObjectName("ProfileSettingsForm")
|
||||
self.resize(600, 400)
|
||||
self.setMinimumSize(QtCore.QSize(600, 400))
|
||||
self.setMaximumSize(QtCore.QSize(600, 400))
|
||||
self.setBaseSize(QtCore.QSize(600, 400))
|
||||
self.nick = QtGui.QLineEdit(self)
|
||||
self.nick.setGeometry(QtCore.QRect(30, 60, 351, 27))
|
||||
self.nick.setObjectName("nick")
|
||||
self.status = QtGui.QLineEdit(self)
|
||||
self.status.setGeometry(QtCore.QRect(30, 130, 351, 27))
|
||||
self.status.setObjectName("status")
|
||||
self.label = QtGui.QLabel(self)
|
||||
self.label.setGeometry(QtCore.QRect(50, 30, 91, 21))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(18)
|
||||
font.setWeight(75)
|
||||
font.setBold(True)
|
||||
self.label.setFont(font)
|
||||
self.label.setObjectName("label")
|
||||
self.label_2 = QtGui.QLabel(self)
|
||||
self.label_2.setGeometry(QtCore.QRect(50, 100, 91, 21))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(18)
|
||||
font.setWeight(75)
|
||||
font.setBold(True)
|
||||
self.label_2.setFont(font)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.label_3 = QtGui.QLabel(self)
|
||||
self.label_3.setGeometry(QtCore.QRect(50, 170, 91, 21))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(18)
|
||||
font.setWeight(75)
|
||||
font.setBold(True)
|
||||
self.label_3.setFont(font)
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.tox_id = QtGui.QLabel(self)
|
||||
self.tox_id.setGeometry(QtCore.QRect(10, 210, 91, 21))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(18)
|
||||
font.setWeight(75)
|
||||
font.setBold(True)
|
||||
self.tox_id.setFont(font)
|
||||
self.tox_id.setObjectName("tox_id")
|
||||
self.copyId = QtGui.QPushButton(self)
|
||||
self.copyId.setGeometry(QtCore.QRect(40, 250, 98, 31))
|
||||
self.copyId.setObjectName("copyId")
|
||||
self.comboBox = QtGui.QComboBox(self)
|
||||
self.comboBox.setGeometry(QtCore.QRect(30, 350, 211, 27))
|
||||
self.comboBox.setObjectName("comboBox")
|
||||
self.tox_id_2 = QtGui.QLabel(self)
|
||||
self.tox_id_2.setGeometry(QtCore.QRect(40, 310, 121, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(18)
|
||||
font.setWeight(75)
|
||||
font.setBold(True)
|
||||
self.tox_id_2.setFont(font)
|
||||
self.tox_id_2.setObjectName("tox_id_2")
|
||||
self.retranslateUi()
|
||||
QtCore.QMetaObject.connectSlotsByName(self)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.setWindowTitle(QtGui.QApplication.translate("ProfileSettingsForm", "Profile settings", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Name:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label_2.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Status:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label_3.setText(QtGui.QApplication.translate("ProfileSettingsForm", "TOX ID:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.tox_id.setText(QtGui.QApplication.translate("ProfileSettingsForm", "TOX ID:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.copyId.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Copy TOX ID", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.tox_id_2.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Language:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
||||
|
||||
class NetworkSettings(QtGui.QWidget):
|
||||
"""Network settings form: UDP, Ipv6 and proxy"""
|
||||
|
||||
def __init__(self):
|
||||
super(NetworkSettings, self).__init__()
|
||||
self.initUI()
|
||||
|
||||
def initUI(self):
|
||||
self.setObjectName("NetworkSettings")
|
||||
self.resize(300, 300)
|
||||
self.setMinimumSize(QtCore.QSize(300, 300))
|
||||
self.setMaximumSize(QtCore.QSize(300, 300))
|
||||
self.setBaseSize(QtCore.QSize(300, 300))
|
||||
self.ipv = QtGui.QCheckBox(self)
|
||||
self.ipv.setGeometry(QtCore.QRect(20, 10, 97, 22))
|
||||
self.ipv.setObjectName("ipv")
|
||||
self.udp = QtGui.QCheckBox(self)
|
||||
self.udp.setGeometry(QtCore.QRect(20, 50, 97, 22))
|
||||
self.udp.setObjectName("udp")
|
||||
self.proxy = QtGui.QCheckBox(self)
|
||||
self.proxy.setGeometry(QtCore.QRect(20, 90, 97, 22))
|
||||
self.proxy.setObjectName("proxy")
|
||||
self.proxyip = QtGui.QLineEdit(self)
|
||||
self.proxyip.setGeometry(QtCore.QRect(40, 160, 231, 27))
|
||||
self.proxyip.setObjectName("proxyip")
|
||||
self.proxyport = QtGui.QLineEdit(self)
|
||||
self.proxyport.setGeometry(QtCore.QRect(40, 220, 231, 27))
|
||||
self.proxyport.setObjectName("proxyport")
|
||||
self.label = QtGui.QLabel(self)
|
||||
self.label.setGeometry(QtCore.QRect(40, 130, 66, 17))
|
||||
self.label.setObjectName("label")
|
||||
self.label_2 = QtGui.QLabel(self)
|
||||
self.label_2.setGeometry(QtCore.QRect(40, 190, 66, 17))
|
||||
self.label_2.setObjectName("label_2")
|
||||
|
||||
self.retranslateUi()
|
||||
QtCore.QMetaObject.connectSlotsByName(self)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.setWindowTitle(QtGui.QApplication.translate("NetworkSettings", "Network settings", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.ipv.setText(QtGui.QApplication.translate("Form", "IPv6", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.udp.setText(QtGui.QApplication.translate("Form", "UDP", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.proxy.setText(QtGui.QApplication.translate("Form", "Proxy", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label.setText(QtGui.QApplication.translate("Form", "IP:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label_2.setText(QtGui.QApplication.translate("Form", "Port:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtGui.QApplication(sys.argv)
|
||||
ex = AddContact()
|
||||
ex = NetworkSettings()
|
||||
ex.show()
|
||||
app.connect(app, QtCore.SIGNAL("lastWindowClosed()"), app, QtCore.SLOT("quit()"))
|
||||
app.exec_()
|
||||
|
Loading…
Reference in New Issue
Block a user