diff --git a/Control.py b/Control.py index 9117032..d9fc8be 100644 --- a/Control.py +++ b/Control.py @@ -39,6 +39,7 @@ def ROOTUSER(email): def signUp(email, password, name, techInterest): """ sign up to be an OU, if password field leave blank, to be a GU + :rtype: :param email: :param password: :return: diff --git a/GUI/Controller.py b/GUI/Controller.py new file mode 100644 index 0000000..3571558 --- /dev/null +++ b/GUI/Controller.py @@ -0,0 +1,36 @@ +import sys +from PyQt5 import QtCore, QtWidgets +from GUI.login import Login +from GUI.Signup import Signup + + +class Controller: + + def __init__(self): + pass + + def show_login(self): + self.login = Login() + if self.login.signup_event(): + self.login.switch_window.connect(self.show_signup) + + else: + print("not a new accont") + self.login.show() + + def show_signup(self): + self.login.email_field.setText("") + self.login.password_field.setText("") + self.window = Signup() + self.window.show() + + +def main(): + app = QtWidgets.QApplication(sys.argv) + controller = Controller() + controller.show_login() + sys.exit(app.exec_()) + + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/GUI/Signup.py b/GUI/Signup.py new file mode 100644 index 0000000..07c8004 --- /dev/null +++ b/GUI/Signup.py @@ -0,0 +1,116 @@ +from PyQt5 import QtCore, QtWidgets +from PyQt5.QtCore import QSize +from PyQt5.QtGui import QImage, QPalette, QBrush +import Control +class Signup(QtWidgets.QWidget): + switch_window = QtCore.pyqtSignal() + + def __init__(self): + QtWidgets.QWidget.__init__(self) + self.setWindowTitle('Signup Page') + oImage = QImage("images/signup_image.jpeg") + sImage = oImage.scaled(QSize(605, 458)) # resize Image to widgets size + palette = QPalette() + palette.setBrush(10, QBrush(sImage)) # 10 = Windowrole + self.setPalette(palette) + self.resize(605, 458) + self.setMinimumSize(QtCore.QSize(605, 458)) + self.setMaximumSize(QtCore.QSize(605, 458)) + self.setBaseSize(QtCore.QSize(605, 358)) + + self.signup_button = QtWidgets.QPushButton(self) + self.signup_button.setGeometry(QtCore.QRect(230, 410, 93, 28)) + self.signup_button.setObjectName("signup_button") + ################################# signup button event ########### + self.signup_button.clicked.connect(self.signup_event) + ################################################################# + self.formLayoutWidget_2 = QtWidgets.QWidget(self) + self.formLayoutWidget_2.setGeometry(QtCore.QRect(20, 240, 411, 173)) + self.formLayoutWidget_2.setObjectName("formLayoutWidget_2") + self.formLayout_2 = QtWidgets.QFormLayout(self.formLayoutWidget_2) + self.formLayout_2.setContentsMargins(0, 0, 0, 0) + self.formLayout_2.setObjectName("formLayout_2") + self.label_2 = QtWidgets.QLabel(self.formLayoutWidget_2) + self.label_2.setObjectName("label_2") + self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_2) + self.label_4 = QtWidgets.QLabel(self.formLayoutWidget_2) + self.label_4.setObjectName("label_4") + self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_4) + self.name_field = QtWidgets.QLineEdit(self.formLayoutWidget_2) + self.name_field.setObjectName("name_field") + self.name_field.setPlaceholderText("Enter your name") + self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.name_field) + self.label_5 = QtWidgets.QLabel(self.formLayoutWidget_2) + self.label_5.setObjectName("label_5") + self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_5) + self.interest_field = QtWidgets.QLineEdit(self.formLayoutWidget_2) + self.interest_field.setObjectName("interest_field") + self.interest_field.setPlaceholderText("Enter your interest") + self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.interest_field) + self.label_3 = QtWidgets.QLabel(self.formLayoutWidget_2) + self.label_3.setObjectName("label_3") + self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_3) + self.password_field = QtWidgets.QLineEdit(self.formLayoutWidget_2) + self.password_field.setEchoMode(QtWidgets.QLineEdit.PasswordEchoOnEdit) + self.password_field.setObjectName("password_field") + self.password_field.setPlaceholderText("Create a password") + self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.password_field) + self.label = QtWidgets.QLabel(self.formLayoutWidget_2) + self.label.setObjectName("label") + self.formLayout_2.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label) + self.confirm_password_field = QtWidgets.QLineEdit(self.formLayoutWidget_2) + self.confirm_password_field.setEchoMode(QtWidgets.QLineEdit.PasswordEchoOnEdit) + self.confirm_password_field.setDragEnabled(False) + self.confirm_password_field.setObjectName("confirm_password_field") + self.confirm_password_field.setPlaceholderText("Confirm your password") + self.formLayout_2.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.confirm_password_field) + self.email_field = QtWidgets.QLineEdit(self.formLayoutWidget_2) + self.email_field.setText("") + self.email_field.setObjectName("email_field") + self.email_field.setPlaceholderText("Enter your email") + self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.email_field) + + self.retranslateUi(self) + QtCore.QMetaObject.connectSlotsByName(self) + + def retranslateUi(self, Dialog): + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "Dialog")) + self.signup_button.setText(_translate("Dialog", "Sign Up")) + self.label_2.setText(_translate("Dialog", "Email:")) + self.label_4.setText(_translate("Dialog", "Name:")) + self.label_5.setText(_translate("Dialog", "Technical Interests:")) + self.label_3.setText(_translate("Dialog", "Password:")) + self.label.setText(_translate("Dialog", "Confirm Your Password:")) + self.email_field.setWhatsThis(_translate("Dialog", "

sadsad

")) + + def signup_event(self): + print("sign up button is pressed") + # sign up successful + if (Control.signUp(str(self.email_field), str(self.email_field), str(self.name_field), str(self.interest_field)) == 1): + em = QtWidgets.QMessageBox() + em.setText("Sign Up Successfully") + em.setStandardButtons(QtWidgets.QMessageBox.Ok) + em.exec_() + if QtWidgets.QMessageBox.Ok: + self.close() + return 1 + + + # guest user registered + elif (Control.signUp(str(self.email_field), str(self.email_field), str(self.name_field),str(self.interest_field)) == 0): + em = QtWidgets.QMessageBox() + em.setText("Guest User Registered") + em.setStandardButtons(QtWidgets.QMessageBox.Ok) + em.exec_() + return 0 + + # account existed, go back to login page + else: + em = QtWidgets.QMessageBox() + em.setIcon(QtWidgets.QMessageBox.Warning) + em.setText("User already existed, please login") + em.setStandardButtons(QtWidgets.QMessageBox.Ok) + em.exec_() + return -1 + diff --git a/GUI/__pycache__/Signup_1.cpython-37.pyc b/GUI/__pycache__/Signup_1.cpython-37.pyc new file mode 100644 index 0000000..8aa0b0a Binary files /dev/null and b/GUI/__pycache__/Signup_1.cpython-37.pyc differ diff --git a/GUI/__pycache__/login.cpython-37.pyc b/GUI/__pycache__/login.cpython-37.pyc new file mode 100644 index 0000000..1c9125a Binary files /dev/null and b/GUI/__pycache__/login.cpython-37.pyc differ diff --git a/GUI/__pycache__/login_1.cpython-37.pyc b/GUI/__pycache__/login_1.cpython-37.pyc new file mode 100644 index 0000000..1c4440a Binary files /dev/null and b/GUI/__pycache__/login_1.cpython-37.pyc differ diff --git a/GUI/__pycache__/signup.cpython-37.pyc b/GUI/__pycache__/signup.cpython-37.pyc new file mode 100644 index 0000000..f7d6197 Binary files /dev/null and b/GUI/__pycache__/signup.cpython-37.pyc differ diff --git a/GUI/form.ui b/GUI/form.ui new file mode 100644 index 0000000..24454e8 --- /dev/null +++ b/GUI/form.ui @@ -0,0 +1,37 @@ + + + Form + + + + 0 + 0 + 605 + 458 + + + + + 605 + 458 + + + + + 605 + 458 + + + + + 605 + 458 + + + + Form + + + + + diff --git a/GUI/images/login_image.jpeg b/GUI/images/login_image.jpeg new file mode 100644 index 0000000..b0a6b2d Binary files /dev/null and b/GUI/images/login_image.jpeg differ diff --git a/GUI/images/signup_image.jpeg b/GUI/images/signup_image.jpeg new file mode 100644 index 0000000..38df382 Binary files /dev/null and b/GUI/images/signup_image.jpeg differ diff --git a/GUI/login.py b/GUI/login.py index 0eadda0..c8f4380 100644 --- a/GUI/login.py +++ b/GUI/login.py @@ -1,97 +1,95 @@ -# -*- coding: utf-8 -*- +from PyQt5 import QtCore, QtWidgets +from PyQt5.QtCore import QSize +from PyQt5.QtGui import QImage, QPalette, QBrush +import Control -# Form implementation generated from reading ui file 'login.ui' -# -# Created by: PyQt5 UI code generator 5.11.3 -# -# WARNING! All changes made in this file will be lost! +class Login(QtWidgets.QWidget): -from PyQt5 import QtCore, QtGui, QtWidgets -from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QMessageBox -from signup import Ui_Signup + switch_window = QtCore.pyqtSignal() -class Ui_Dialog(object): + def __init__(self): + QtWidgets.QWidget.__init__(self) + self.setWindowTitle('Login Page') + oImage = QImage("images/login_image.jpeg") + sImage = oImage.scaled(QSize(605,458)) # resize Image to widgets size + palette = QPalette() + palette.setBrush(10, QBrush(sImage)) # 10 = Windowrole + self.setPalette(palette) + self.resize(605, 458) + self.setMinimumSize(QtCore.QSize(605, 458)) + self.setMaximumSize(QtCore.QSize(605, 458)) + self.setBaseSize(QtCore.QSize(605, 358)) - # event handler for signup button - def signup_check(self): - print("signup button is clicked") - - self.signupWindow = QtWidgets.QDialog() - self.ui = Ui_Signup() - self.ui.setupUi(self.signupWindow) - self.signupWindow.show() - - def setupUi(self, Dialog): - Dialog.setObjectName("Dialog") - Dialog.resize(637, 477) - Dialog.setStyleSheet("QDialog{\n" -" background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 170, 0, 255), stop:1 rgba(255, 255, 255, 255))\n" -"}\n" -"QPushButton{\n" -" background-color:rgb(255, 255, 255)\n" -" border: none;\n" -"}") - self.label_2 = QtWidgets.QLabel(Dialog) - self.label_2.setGeometry(QtCore.QRect(160, 170, 91, 21)) + self.login_button = QtWidgets.QPushButton(self) + self.login_button.setGeometry(QtCore.QRect(300, 390, 93, 28)) + #########################3 Login button event ######################## + self.login_button.clicked.connect(self.login_event) + ####################################################################### + self.signup_button = QtWidgets.QPushButton(self) + self.signup_button.setGeometry(QtCore.QRect(200, 390, 93, 31)) + #########################3 Signup button event ######################## + self.signup_button.clicked.connect(self.signup_event) + ####################################################################### + self.formLayoutWidget = QtWidgets.QWidget(self) + self.formLayoutWidget.setGeometry(QtCore.QRect(140, 300, 291, 81)) + self.formLayoutWidget.setObjectName("formLayoutWidget") + self.formLayout = QtWidgets.QFormLayout(self.formLayoutWidget) + self.formLayout.setContentsMargins(0, 0, 0, 0) + self.formLayout.setObjectName("formLayout") + self.label_2 = QtWidgets.QLabel(self.formLayoutWidget) + self.label_2.setStyleSheet("font: 13pt \".SF NS Text\";") self.label_2.setObjectName("label_2") - self.label_3 = QtWidgets.QLabel(Dialog) - self.label_3.setGeometry(QtCore.QRect(160, 220, 91, 21)) - self.label_3.setObjectName("label_3") - self.email_field = QtWidgets.QLineEdit(Dialog) - self.email_field.setGeometry(QtCore.QRect(240, 170, 201, 22)) - self.email_field.setText("") - self.email_field.setObjectName("email_field") - self.password_field = QtWidgets.QLineEdit(Dialog) - self.password_field.setGeometry(QtCore.QRect(240, 220, 201, 22)) + self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_2) + self.password_field = QtWidgets.QLineEdit(self.formLayoutWidget) self.password_field.setEchoMode(QtWidgets.QLineEdit.PasswordEchoOnEdit) self.password_field.setObjectName("password_field") - self.login_button = QtWidgets.QPushButton(Dialog) - self.login_button.setGeometry(QtCore.QRect(290, 280, 93, 28)) - self.login_button.setObjectName("login_button") - self.signup_button = QtWidgets.QPushButton(Dialog) - self.signup_button.setGeometry(QtCore.QRect(290, 320, 93, 28)) - self.signup_button.setObjectName("signup_button") - #########################3 Signup button event ######################## - self.signup_button.clicked.connect(self.signup_check) - ####################################################################### - self.login_page_label = QtWidgets.QLabel(Dialog) - self.login_page_label.setGeometry(QtCore.QRect(220, 70, 211, 91)) - self.login_page_label.setMinimumSize(QtCore.QSize(5, 0)) - self.login_page_label.setBaseSize(QtCore.QSize(40, 16)) - font = QtGui.QFont() - font.setPointSize(41) - font.setBold(False) - font.setItalic(False) - font.setUnderline(False) - font.setWeight(50) - font.setStrikeOut(False) - font.setStyleStrategy(QtGui.QFont.PreferAntialias) - self.login_page_label.setFont(font) - self.login_page_label.setFocusPolicy(QtCore.Qt.NoFocus) - self.login_page_label.setContextMenuPolicy(QtCore.Qt.NoContextMenu) - self.login_page_label.setTextFormat(QtCore.Qt.AutoText) - self.login_page_label.setAlignment(QtCore.Qt.AlignCenter) - self.login_page_label.setObjectName("login_page_label") + self.password_field.setPlaceholderText("Enter your password") + self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.password_field) + self.email_field = QtWidgets.QLineEdit(self.formLayoutWidget) + self.email_field.setText("") + self.email_field.setObjectName("email_field") + self.email_field.setPlaceholderText("Enter your email") + self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.email_field) + self.label = QtWidgets.QLabel(self.formLayoutWidget) + self.label.setObjectName("label") + self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label) - self.retranslateUi(Dialog) - QtCore.QMetaObject.connectSlotsByName(Dialog) + self.retranslateUi(self) + QtCore.QMetaObject.connectSlotsByName(self) def retranslateUi(self, Dialog): _translate = QtCore.QCoreApplication.translate - Dialog.setWindowTitle(_translate("Dialog", "Dialog")) - self.label_2.setText(_translate("Dialog", "Email:")) - self.label_3.setText(_translate("Dialog", "Password: ")) + Dialog.setWindowTitle("Login Page") self.login_button.setText(_translate("Dialog", "Login")) self.signup_button.setText(_translate("Dialog", "Sign Up")) - self.login_page_label.setText(_translate("Dialog", "Login Page")) + self.label_2.setText(_translate("Dialog", "Email:")) + self.label.setText(_translate("Dialog", "Password:")) + + def login_event(self): + print("login is pressed") + if (Control.signIn(str(self.email_field), str(self.password_field)) == -1): + em = QtWidgets.QMessageBox() + em.setIcon(QtWidgets.QMessageBox.Warning) + em.setText("Account not found, Please create an account") + em.setStandardButtons(QtWidgets.QMessageBox.Ok) + em.exec_() + self.signup_event() + + # correct users + elif (Control.signIn(str(self.email_field), str(self.password_field)) == 1): + self.isIn_event() + # already login + elif (Control.signIn(str(self.email_field), str(self.password_field)) == 2): + em = QtWidgets.QMessageBox() + em.setIcon(QtWidgets.QMessageBox.Warning) + em.setText("Already login!") + em.setStandardButtons(QtWidgets.QMessageBox.Ok) + em.exec_() + def signup_event(self): + self.switch_window.emit() + return -1 -if __name__ == "__main__": - import sys - app = QtWidgets.QApplication(sys.argv) - Dialog = QtWidgets.QDialog() - ui = Ui_Dialog() - ui.setupUi(Dialog) - Dialog.show() - sys.exit(app.exec_()) + def isIn(self): + return 1 \ No newline at end of file diff --git a/GUI/login.ui b/GUI/login.ui index 3607156..468d97f 100644 --- a/GUI/login.ui +++ b/GUI/login.ui @@ -6,147 +6,103 @@ 0 0 - 637 - 477 + 605 + 458 + + + 605 + 458 + + + + + 605 + 458 + + + + + 605 + 358 + + Dialog QDialog{ - background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 170, 0, 255), stop:1 rgba(255, 255, 255, 255)) + background-image: url(Users/kappa/Library/Containers/com.tencent.xinWeChat/Data/Library/Application Support/com.tencent.xinWeChat/2.0b4.0.9/1feec28dbcbbd41c908e5319f9080e3b/Message/MessageTemp/047868fcf45822c2e58d288b5fe5d070/Image/5041543441403_.pic.jpg) } QPushButton{ background-color:rgb(255, 255, 255) border: none; } - - - - 160 - 170 - 91 - 21 - - - - Email: - - - - - - 160 - 220 - 91 - 21 - - - - Password: - - - - - - 240 - 170 - 201 - 22 - - - - - - - - - - 240 - 220 - 201 - 22 - - - - QLineEdit::PasswordEchoOnEdit - - - - - - 290 - 280 - 93 - 28 - - - - Login - - - + + false + + - 290 + 110 320 - 93 - 28 - - - - Sign Up - - - - - - 220 - 70 - 211 - 91 + 361 + 130 - - - 5 - 0 - - - - - 40 - 16 - - - - - 41 - 50 - false - false - false - false - PreferAntialias - - - - Qt::NoFocus - - - Qt::NoContextMenu - - - Login Page - - - Qt::AutoText - - - Qt::AlignCenter - + + + + + font: 13pt ".SF NS Text"; + + + Email: + + + + + + + Password: + + + + + + + QLineEdit::PasswordEchoOnEdit + + + + + + + + + Sign Up + + + + + + + Login + + + + + + + + + + + + + diff --git a/GUI/mainwindow.ui b/GUI/mainwindow.ui new file mode 100644 index 0000000..6da9707 --- /dev/null +++ b/GUI/mainwindow.ui @@ -0,0 +1,86 @@ + + + Dialog + + + + 0 + 0 + 605 + 458 + + + + + 605 + 458 + + + + + 605 + 458 + + + + + 605 + 458 + + + + Dialog + + + + + 450 + 60 + 114 + 32 + + + + Manage + + + + + + 0 + 160 + 611 + 301 + + + + + + + 0 + 40 + 160 + 80 + + + + + + + Welcome, + + + + + + + dadssada + + + + + + + + + diff --git a/GUI/mainwinodw.py b/GUI/mainwinodw.py new file mode 100644 index 0000000..70da73f --- /dev/null +++ b/GUI/mainwinodw.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'mainwindow.ui' +# +# Created by: PyQt5 UI code generator 5.11.3 +# +# WARNING! All changes made in this file will be lost! + +from PyQt5 import QtCore, QtGui, QtWidgets + +class Ui_Dialog(object): + def setupUi(self, Dialog): + Dialog.setObjectName("Dialog") + Dialog.resize(605, 458) + Dialog.setMinimumSize(QtCore.QSize(605, 458)) + Dialog.setMaximumSize(QtCore.QSize(605, 458)) + Dialog.setBaseSize(QtCore.QSize(605, 458)) + self.pushButton = QtWidgets.QPushButton(Dialog) + self.pushButton.setGeometry(QtCore.QRect(450, 60, 114, 32)) + self.pushButton.setObjectName("pushButton") + self.listView = QtWidgets.QListView(Dialog) + self.listView.setGeometry(QtCore.QRect(0, 160, 611, 301)) + self.listView.setObjectName("listView") + self.gridLayoutWidget = QtWidgets.QWidget(Dialog) + self.gridLayoutWidget.setGeometry(QtCore.QRect(0, 40, 160, 80)) + self.gridLayoutWidget.setObjectName("gridLayoutWidget") + self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget) + self.gridLayout.setContentsMargins(0, 0, 0, 0) + self.gridLayout.setObjectName("gridLayout") + self.label = QtWidgets.QLabel(self.gridLayoutWidget) + self.label.setObjectName("label") + self.gridLayout.addWidget(self.label, 0, 0, 1, 1) + self.label_2 = QtWidgets.QLabel(self.gridLayoutWidget) + self.label_2.setObjectName("label_2") + self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) + + self.retranslateUi(Dialog) + QtCore.QMetaObject.connectSlotsByName(Dialog) + + def retranslateUi(self, Dialog): + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "Dialog")) + self.pushButton.setText(_translate("Dialog", "Manage")) + self.label.setText(_translate("Dialog", "Welcome,")) + self.label_2.setText(_translate("Dialog", "dadssada")) + + +if __name__ == "__main__": + import sys + app = QtWidgets.QApplication(sys.argv) + Dialog = QtWidgets.QDialog() + ui = Ui_Dialog() + ui.setupUi(Dialog) + Dialog.show() + sys.exit(app.exec_()) + diff --git a/GUI/signup.py b/GUI/signup.py deleted file mode 100644 index 2218c01..0000000 --- a/GUI/signup.py +++ /dev/null @@ -1,77 +0,0 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'signup.ui' -# -# Created by: PyQt5 UI code generator 5.11.3 -# -# WARNING! All changes made in this file will be lost! - -from PyQt5 import QtCore, QtGui, QtWidgets - -class Ui_Signup(object): - def setupUi(self, Dialog): - Dialog.setObjectName("Dialog") - Dialog.resize(629, 446) - Dialog.setStyleSheet("QDialog{\n" -" background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 170, 0, 255), stop:1 rgba(255, 255, 255, 255))\n" -"}\n" -"QPushButton{\n" -" background-color:rgb(255, 255, 255)\n" -" border: none;\n" -"}") - self.email_field = QtWidgets.QLineEdit(Dialog) - self.email_field.setGeometry(QtCore.QRect(240, 150, 201, 22)) - self.email_field.setText("") - self.email_field.setObjectName("email_field") - self.label_3 = QtWidgets.QLabel(Dialog) - self.label_3.setGeometry(QtCore.QRect(160, 200, 91, 21)) - self.label_3.setObjectName("label_3") - self.signup_button = QtWidgets.QPushButton(Dialog) - self.signup_button.setGeometry(QtCore.QRect(290, 260, 93, 28)) - self.signup_button.setObjectName("signup_button") - self.label_2 = QtWidgets.QLabel(Dialog) - self.label_2.setGeometry(QtCore.QRect(160, 150, 91, 21)) - self.label_2.setObjectName("label_2") - self.password_field = QtWidgets.QLineEdit(Dialog) - self.password_field.setGeometry(QtCore.QRect(240, 200, 201, 22)) - self.password_field.setEchoMode(QtWidgets.QLineEdit.PasswordEchoOnEdit) - self.password_field.setObjectName("password_field") - self.login_page_label = QtWidgets.QLabel(Dialog) - self.login_page_label.setGeometry(QtCore.QRect(190, 30, 251, 91)) - self.login_page_label.setMinimumSize(QtCore.QSize(5, 0)) - self.login_page_label.setBaseSize(QtCore.QSize(40, 16)) - font = QtGui.QFont() - font.setPointSize(41) - font.setBold(False) - font.setItalic(False) - font.setUnderline(False) - font.setWeight(50) - font.setStrikeOut(False) - font.setStyleStrategy(QtGui.QFont.PreferAntialias) - self.login_page_label.setFont(font) - self.login_page_label.setFocusPolicy(QtCore.Qt.NoFocus) - self.login_page_label.setContextMenuPolicy(QtCore.Qt.NoContextMenu) - self.login_page_label.setTextFormat(QtCore.Qt.AutoText) - self.login_page_label.setAlignment(QtCore.Qt.AlignCenter) - self.login_page_label.setObjectName("login_page_label") - - self.retranslateUi(Dialog) - QtCore.QMetaObject.connectSlotsByName(Dialog) - - def retranslateUi(self, Dialog): - _translate = QtCore.QCoreApplication.translate - Dialog.setWindowTitle(_translate("Dialog", "Dialog")) - self.label_3.setText(_translate("Dialog", "Password: ")) - self.signup_button.setText(_translate("Dialog", "Sign Up")) - self.label_2.setText(_translate("Dialog", "Email:")) - self.login_page_label.setText(_translate("Dialog", "Sign Up Page")) - - -if __name__ == "__main__": - import sys - app = QtWidgets.QApplication(sys.argv) - Dialog = QtWidgets.QDialog() - ui = Ui_Signup() - ui.setupUi(Dialog) - Dialog.show() - sys.exit(app.exec_()) diff --git a/GUI/signup.ui b/GUI/signup.ui index d768ab5..0b75b1c 100644 --- a/GUI/signup.ui +++ b/GUI/signup.ui @@ -2,57 +2,52 @@ Dialog + + true + 0 0 - 629 - 446 + 590 + 458 + + + 590 + 458 + + + + + 594 + 458 + + + + + 590 + 458 + + Dialog QDialog{ - background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 170, 0, 255), stop:1 rgba(255, 255, 255, 255)) + background-image: url(Users/kappa/Library/Containers/com.tencent.xinWeChat/Data/Library/Application Support/com.tencent.xinWeChat/2.0b4.0.9/1feec28dbcbbd41c908e5319f9080e3b/Message/MessageTemp/9e20f478899dc29eb19741386f9343c8/Image/541543462213_.pic.jpg); } QPushButton{ background-color:rgb(255, 255, 255) border: none; } - - - - 240 - 150 - 201 - 22 - - - - - - - - - - 160 - 200 - 91 - 21 - - - - Password: - - - 290 - 260 + 230 + 410 93 28 @@ -61,79 +56,102 @@ QPushButton{ Sign Up - - - - 160 - 150 - 91 - 21 - - - - Email: - - - - - - 240 - 200 - 201 - 22 - - - - QLineEdit::PasswordEchoOnEdit - - - + - 190 - 30 - 251 - 91 + 20 + 240 + 411 + 173 - - - 5 - 0 - - - - - 40 - 16 - - - - - 41 - 50 - false - false - false - false - PreferAntialias - - - - Qt::NoFocus - - - Qt::NoContextMenu - - - Sign Up Page - - - Qt::AutoText - - - Qt::AlignCenter - + + + + + Email: + + + + + + + Name: + + + + + + + QLineEdit::PasswordEchoOnEdit + + + + + + + + + + Technical Interests: + + + + + + + QLineEdit::PasswordEchoOnEdit + + + + + + + Password: + + + + + + + QLineEdit::PasswordEchoOnEdit + + + + + + + Confirm Your Password: + + + + + + + QLineEdit::PasswordEchoOnEdit + + + false + + + + + + + + + + <html><head/><body><p>sadsad</p></body></html> + + + + + + + + + + diff --git a/__pycache__/Account.cpython-37.pyc b/__pycache__/Account.cpython-37.pyc new file mode 100644 index 0000000..2c57912 Binary files /dev/null and b/__pycache__/Account.cpython-37.pyc differ diff --git a/__pycache__/Control.cpython-37.pyc b/__pycache__/Control.cpython-37.pyc new file mode 100644 index 0000000..512c33e Binary files /dev/null and b/__pycache__/Control.cpython-37.pyc differ diff --git a/__pycache__/DB.cpython-37.pyc b/__pycache__/DB.cpython-37.pyc new file mode 100644 index 0000000..6be0be3 Binary files /dev/null and b/__pycache__/DB.cpython-37.pyc differ diff --git a/__pycache__/Document.cpython-37.pyc b/__pycache__/Document.cpython-37.pyc new file mode 100644 index 0000000..d6fc611 Binary files /dev/null and b/__pycache__/Document.cpython-37.pyc differ diff --git a/__pycache__/Taboo.cpython-37.pyc b/__pycache__/Taboo.cpython-37.pyc new file mode 100644 index 0000000..17da9e0 Binary files /dev/null and b/__pycache__/Taboo.cpython-37.pyc differ diff --git a/__pycache__/User.cpython-37.pyc b/__pycache__/User.cpython-37.pyc new file mode 100644 index 0000000..7ff3e98 Binary files /dev/null and b/__pycache__/User.cpython-37.pyc differ