1
+ #CreateAccount.py
2
+ from PyQt5 .QtWidgets import QMainWindow , QFileDialog
3
+ from PyQt5 import QtWidgets
4
+ from PyQt5 .QtGui import QPixmap
5
+ import re # for regular expressions and used to validate email
6
+ from PyQt5 .uic import loadUi
7
+ from Mainpage import MainScreen
8
+ import sqlite3
9
+
10
+
11
+ class CreateAccountScreen (QMainWindow ):
12
+ def __init__ (self , widget ):
13
+ super (CreateAccountScreen , self ).__init__ ()
14
+ loadUi ("CreateAccount.ui" , self )
15
+ self .widget = widget
16
+
17
+ #### HIDING PASSWORD FIELD IN THE CREATEACCOUNT PAGE ####
18
+ self .Password_LineEdit .setEchoMode (QtWidgets .QLineEdit .Password )
19
+
20
+ #### SUBMIT BUTTON THAT LEADS TO THE MAINPAGE ####
21
+ self .submit_Button .clicked .connect (self .Submit )
22
+
23
+ ## BUTTTON TO UPLOAD A PICTURE ###
24
+ self .Upload_Picture_button .clicked .connect (self .uploadImage )
25
+
26
+ #########################################################################################
27
+ ## METHOD THAT VERIFIES IF THE USERNAME THE USER IS ENTERING IS NOT YET TAKEN ##
28
+ #########################################################################################
29
+ def isUsernameTaken (self , username ):
30
+ pass
31
+
32
+
33
+ ########################################################################################
34
+ ## METHOD TO CHECK IF THE USER INFO IS ENTERED IN THE CORRECT FORMAT ##
35
+ ########################################################################################
36
+ def CheckInfo (self , username , email , password , age , phonenumber , location , gender ):
37
+ # Check if the information is in the correct format
38
+ pass
39
+
40
+ #############################################################################################
41
+ ## METHOD THAT STORES USER INFO IN THE DATABASE AFTER VALIDATION ##
42
+ #############################################################################################
43
+
44
+ def storeInDataBase (self , username , email , password , age , phonenumber , location ,gender , image_path ):
45
+ pass
46
+
47
+ ##############################################################################################
48
+ ## METHOD THAT ALLOWS USER TO UPLOAD AN IMAGE FOR HIS PROFILE ##
49
+ ##############################################################################################
50
+
51
+ def uploadImage (self ):
52
+ pass
53
+
54
+ ####################################################################################################
55
+ ## THE FINAL SUBMIT BUTTON THAT VERIFIES ALL THE OTHER METHODS, THEN MOVES TO THE MAINPAGE ##
56
+ ####################################################################################################
57
+
58
+ def Submit (self ):
59
+ pass
0 commit comments