def execute(self): database = Database() database.GetCursor().execute(""" SELECT * FROM Task t {} ORDER BY ( SELECT nilai FROM Prioritas p WHERE t.jenis = p.jenis ) """.format("" if self.jenisTask == "" else "WHERE jenis = \"{}\"".format(self.jenisTask))) result = database.GetCursor().fetchall() if len(result) == 0: if self.jenisTask == "": self.tempResult = "Tidak ada tugas yang didaftarkan!" else: self.tempResult = "Tidak ada {} yang harus dikerjakan".format( self.jenisTask) else: self.tempResult = "[Daftar Deadline]" for record in result: self.tempResult += "\n" + \ "(ID: {}) ".format(record[0]) + " - ".join(record[1:])
def execute(self): database = Database() database.GetCursor().execute( """ SELECT * FROM Task t ORDER BY ( SELECT nilai FROM Prioritas p WHERE t.jenis = p.jenis ) """ ) value = database.GetCursor().fetchall() dateStart = self.dateStart dateEnd = self.dateEnd print(dateStart) print(dateEnd) result = [] for i in range(len(value)): if (value[i][4] <= dateEnd and value[i][4] >= dateStart): result.append(value[i]) if len(result) == 0: self.tempResult = "Tidak ada deadline/jadwal pada rentang tanggal tersebut, :)" else: self.tempResult = "[Daftar Deadline]" for record in result: self.tempResult += "\n" + \ "(ID: {}) ".format(record[0]) + " - ".join(record[1:])
def execute(self): database = Database() database.GetCursor().execute(""" SELECT * FROM Task t WHERE t.tanggal = DATE("now", "localtime") {} ORDER BY ( SELECT nilai FROM Prioritas p WHERE t.jenis = p.jenis ) """.format("" if self.jenisTask == "" else "AND jenis = \"{}\"".format(self.jenisTask))) result = database.GetCursor().fetchall() if len(result) == 0: if self.jenisTask == "": self.tempResult = "Tidak ada deadline/jadwal untuk hari ini, yay! :D" else: self.tempResult = "Tidak ada {} untuk hari ini, yay! :D".format( self.jenisTask) else: self.tempResult = "[Daftar Deadline]" for record in result: self.tempResult += "\n" + "(ID: {}) ".format( record[0]) + " - ".join(record[1:]) self.tempResult += "Tetap semangat! ^_^"
def test_insert_task(self): database = Database() # Hanya untuk menghapus tes sebelumnya jika ada database.GetCursor().execute( """ DELETE FROM Task WHERE ID = "TEST_ID" """ ) database.InsertTask('TEST_ID','IF3110','Kuis','Bab 2 sampai 3','22/04/2021') database.GetCursor().execute("SELECT * FROM Task where ID = \"TEST_ID\"") result = database.GetCursor().fetchall() assert len(result) == 1, "Primary key Task tidak berjalan dengan baik atau data tidak tersimpan." result = result[0] assert result[0] == "TEST_ID" assert result[1] == "IF3110" assert result[2] == "Kuis" assert result[3] == "Bab 2 sampai 3" assert result[4] == "22/04/2021" # Hanya untuk menghapus tes sebelumnya jika ada database.GetCursor().execute( """ DELETE FROM Task WHERE ID = "TEST_ID" """ ) database.GetConnection().commit()
def execute(self): database = Database() database.GetCursor().execute(""" SELECT * FROM Task t ORDER BY ( SELECT nilai FROM Prioritas p WHERE t.jenis = p.jenis ) """) value = database.GetCursor().fetchall() matkul = self.matkul jenisTask = self.jenisTask # print(dateStart) # print(dateEnd) result = [] found = False i = 0 while (i < len(value)): if (value[i][1] == matkul): result.append(value[i]) i += 1 print(result) if len(result) == 0: if (jenisTask == ""): self.tempResult = "Tidak ada deadline/jadwal untuk '{}' '{}' pada tanggal tersebut".format( jenisTask, matkul) else: self.tempResult = "Tidak ada deadline/jadwal untuk '{}' pada tanggal tersebut :)".format( matkul) else: if (jenisTask == ""): for record in result: self.tempResult += "\n" + record[4] + " - " + record[3] else: count = 0 for record in result: if (record[2] == jenisTask): count += 1 self.tempResult += "\n" + record[4] + " - " + record[3] if (count == 0): self.tempResult = "Tidak ada deadline/jadwal untuk '{}' '{}' pada tanggal tersebut".format( jenisTask, matkul)
def initialization(self, request, used_data): database = Database() def cleanup(): for data_id in list(map(lambda row: row[0], used_data)): database.GetCursor().execute(""" DELETE FROM Task WHERE ID = \"{}\" """.format(data_id)) database.GetConnection().commit() cleanup() for row in used_data: database.InsertTask(*row) database.GetConnection().commit() request.addfinalizer(cleanup)
def execute(self): database = Database() database.GetCursor().execute( """ SELECT * FROM Task t {} ORDER BY ( SELECT nilai FROM Prioritas p WHERE t.jenis = p.jenis ) """.format("" if self.jenisTask == "" else "WHERE jenis = \"{}\"".format(self.jenisTask)) ) value = database.GetCursor().fetchall() dateStart = str(datetime.date(datetime.now())) dateEnd = str( datetime.date( datetime.today() + timedelta( days=self.N))) print(dateStart) print(dateEnd) result = [] for i in range(len(value)): if (value[i][4] <= dateEnd and value[i][4] >= dateStart): result.append(value[i]) if len(result) == 0: if self.jenisTask == "": self.tempResult = "Tidak ada tugas yang harus dikerjakan untuk {} hari ke depan".format( self.N) else: self.tempResult = "Tidak ada {} yang harus dikerjakan untuk {} hari ke depan".format( self.jenisTask, self.N) else: self.tempResult = "[Daftar Deadline]" for record in result: self.tempResult += "\n" + \ "(ID: {}) ".format(record[0]) + " - ".join(record[1:])
def execute(self): database = Database() # matkul tidak boleh kosong if self.matkul.strip() != "": # mengecek keberadaan jenis valid_jenis = database.GetCursor().execute(""" SELECT jenis FROM Prioritas """).fetchall() valid_jenis = list(map(lambda row: row[0], valid_jenis)) if self.jenis in valid_jenis: # Generate ID database.GetCursor().execute(""" SELECT ID FROM Task """) id_result = database.GetCursor().fetchall() new_id = "" if len(id_result) == 0: new_id = "1" else: print( str( max(list(map(lambda row: int(row[0]), id_result))) + 1)) new_id = str( max(list(map(lambda row: int(row[0]), id_result))) + 1) print(new_id) new_id = int(new_id) #(self,id, matkul, jenis, deskripsi, tanggal): database.InsertTask( str(new_id), self.matkul, self.jenis, self.deskripsi, "{:0>4}-{:0>2}-{:0>2}".format(self.tahun, self.bulan, self.tanggal)) database.GetConnection().commit() self.tempResult = "Task berhasil ditambahkan! ^o^\n" self.tempResult += "(ID: {}) {} - {} - {} - {}".format( new_id, self.matkul, self.jenis, self.deskripsi, "{:0>4}-{:0>2}-{:0>2}".format(self.tahun, self.bulan, self.tanggal)) else: self.tempResult = "Saya tidak mengenal jenis \"{}\" ... .-.".format( self.jenis) else: self.tempResult = "Saya bingung apa yang perlu diingatkan. .-."
def initialization(self, request): database = Database() def cleanup(): database.GetCursor().execute(""" DELETE FROM Task WHERE nama_matkul LIKE \"TEST_ATCT%\" OR deskripsi LIKE \"TEST_ATCT%\" OR ID LIKE \"TEST_ATCT%\" """) database.GetConnection().commit() cleanup() request.addfinalizer(cleanup)
def execute(self): database = Database() database.GetCursor().execute(""" SELECT * FROM Task t {} """.format("" if self.jenisTask == "" else "WHERE jenis = \"{}\"".format(self.jenisTask))) result = database.GetCursor().fetchall() print(result) if len(result) == 0: if self.jenisTask == "": self.tempResult = "Tidak ada tugas yang didaftarkan!" else: self.tempResult = "Tidak ada {} yang harus dikerjakan".format( self.jenisTask) else: found = False i = 0 while (i < len(result) and found == False): if (result[i][1] == self.namaMatkul and result[i][2] == self.jenisTask): found = True i += 1 if (found): # print("ketemu") database.GetCursor().execute(""" UPDATE Task SET tanggal = "{}" WHERE nama_matkul = "{}" AND jenis = "{}" """.format(self.deadlineBaru, self.namaMatkul, self.jenisTask)) database.GetConnection().commit() self.tempResult = "Yay deadline tugas telah diperbaharui menjadi {} !!!\n".format( self.deadlineBaru) else: self.tempResult += "Tidak ada {} {}".format( self.jenisTask, self.namaMatkul)
class Ui_MainWindow(object): db = Database() cam = Camera(0) camTimer = QtCore.QTimer() tempTimer = QtCore.QTimer() cam.setDaemon(True) holes = NetHoleDetection() clean = NetCleaning() def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1002, 872) MainWindow.setWindowFlags(QtCore.Qt.CustomizeWindowHint) MainWindow.setWindowFlags(QtCore.Qt.FramelessWindowHint) MainWindow.setObjectName("MainWindow") MainWindow.resize(999, 872) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.stackedWidget = QtWidgets.QStackedWidget(self.centralwidget) self.stackedWidget.setGeometry(QtCore.QRect(0, 0, 1000, 873)) self.stackedWidget.setObjectName("stackedWidget") self.loginPage = QtWidgets.QWidget() self.loginPage.setStyleSheet( "border-image: url(:/Images/Resources/signInBG.png);") self.loginPage.setObjectName("loginPage") self.button_signIn_signIn = QtWidgets.QPushButton(self.loginPage) self.button_signIn_signIn.setGeometry(QtCore.QRect(320, 590, 320, 45)) self.button_signIn_signIn.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/signIn.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/signInPressed.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/signInPressed.png);\n" "}") self.button_signIn_signIn.setText("") self.button_signIn_signIn.setObjectName("button_signIn_signIn") self.button_faceID_signIn = QtWidgets.QPushButton(self.loginPage) self.button_faceID_signIn.setGeometry(QtCore.QRect(320, 660, 320, 45)) self.button_faceID_signIn.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/faceID.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/faceIDClicked.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/faceIDClicked.png);\n" "}") self.button_faceID_signIn.setText("") self.button_faceID_signIn.setObjectName("button_faceID_signIn") self.button_signUp_signIn = QtWidgets.QPushButton(self.loginPage) self.button_signUp_signIn.setGeometry(QtCore.QRect(320, 730, 320, 45)) self.button_signUp_signIn.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/signUp.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/signUpPressed.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/signUpPressed.png);\n" "}") self.button_signUp_signIn.setText("") self.button_signUp_signIn.setObjectName("button_signUp_signIn") self.lineEdit_username_signIn = QtWidgets.QLineEdit(self.loginPage) self.lineEdit_username_signIn.setGeometry( QtCore.QRect(310, 345, 281, 31)) self.lineEdit_username_signIn.setStyleSheet( "border-image: url(:/Images/Resources/darkBlackBG.png);\n" "color: rgb(167, 167, 167);") self.lineEdit_username_signIn.setObjectName("lineEdit_username_signIn") self.lineEdit_password_signIn = QtWidgets.QLineEdit(self.loginPage) self.lineEdit_password_signIn.setGeometry( QtCore.QRect(310, 419, 281, 41)) self.lineEdit_password_signIn.setContextMenuPolicy( QtCore.Qt.DefaultContextMenu) self.lineEdit_password_signIn.setStyleSheet( "border-image: url(:/Images/Resources/darkBlackBG.png);\n" "color: rgb(167, 167, 167);\n" "") self.lineEdit_password_signIn.setEchoMode(QtWidgets.QLineEdit.Password) self.lineEdit_password_signIn.setObjectName("lineEdit_password_signIn") self.button_close = QtWidgets.QPushButton(self.loginPage) self.button_close.setGeometry(QtCore.QRect(940, 40, 21, 21)) self.button_close.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/exitBlue.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/exitRed.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/exitRed.png);\n" "}") self.button_close.setText("") self.button_close.setObjectName("button_close") self.label_invalid = QtWidgets.QLabel(self.loginPage) self.label_invalid.setGeometry(QtCore.QRect(400, 300, 201, 16)) self.label_invalid.setStyleSheet( "border-image: url(:/Images/Resources/semiDarkBG.png);\n" "color: rgb(255, 61, 55);") self.label_invalid.setText("") self.label_invalid.setObjectName("label_invalid") self.stackedWidget.addWidget(self.loginPage) self.signupPage = QtWidgets.QWidget() self.signupPage.setStyleSheet( "border-image: url(:/Images/Resources/signUpBG.png);") self.signupPage.setObjectName("signupPage") self.lineEdit_firstName_signUp = QtWidgets.QLineEdit(self.signupPage) self.lineEdit_firstName_signUp.setGeometry( QtCore.QRect(310, 330, 151, 29)) self.lineEdit_firstName_signUp.setStyleSheet( "border-image: url(:/Images/Resources/darkBlackBG.png);\n" "color: rgb(167, 167, 167);") self.lineEdit_firstName_signUp.setObjectName( "lineEdit_firstName_signUp") self.lineEdit_lastName_signUp = QtWidgets.QLineEdit(self.signupPage) self.lineEdit_lastName_signUp.setGeometry( QtCore.QRect(530, 330, 151, 29)) self.lineEdit_lastName_signUp.setStyleSheet( "border-image: url(:/Images/Resources/darkBlackBG.png);\n" "color: rgb(167, 167, 167);") self.lineEdit_lastName_signUp.setObjectName("lineEdit_lastName_signUp") self.lineEdit_email_signUp = QtWidgets.QLineEdit(self.signupPage) self.lineEdit_email_signUp.setGeometry(QtCore.QRect(310, 408, 371, 21)) self.lineEdit_email_signUp.setStyleSheet( "border-image: url(:/Images/Resources/darkBlackBG.png);\n" "color: rgb(167, 167, 167);") self.lineEdit_email_signUp.setObjectName("lineEdit_email_signUp") self.lineEdit_username_signUp = QtWidgets.QLineEdit(self.signupPage) self.lineEdit_username_signUp.setGeometry( QtCore.QRect(310, 490, 371, 21)) self.lineEdit_username_signUp.setStyleSheet( "border-image: url(:/Images/Resources/darkBlackBG.png);\n" "color: rgb(167, 167, 167);") self.lineEdit_username_signUp.setObjectName("lineEdit_username_signUp") self.lineEdit_password_signUp = QtWidgets.QLineEdit(self.signupPage) self.lineEdit_password_signUp.setGeometry( QtCore.QRect(310, 570, 371, 21)) self.lineEdit_password_signUp.setStyleSheet( "border-image: url(:/Images/Resources/darkBlackBG.png);\n" "color: rgb(167, 167, 167);") self.lineEdit_password_signUp.setObjectName("lineEdit_password_signUp") self.button_signUp_signUp = QtWidgets.QPushButton(self.signupPage) self.button_signUp_signUp.setGeometry(QtCore.QRect(340, 640, 320, 45)) self.button_signUp_signUp.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/signUp.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/signUpPressed.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/signUpPressed.png);\n" "}") self.button_signUp_signUp.setText("") self.button_signUp_signUp.setObjectName("button_signUp_signUp") self.button_backToSignIn = QtWidgets.QPushButton(self.signupPage) self.button_backToSignIn.setGeometry(QtCore.QRect(340, 720, 320, 45)) self.button_backToSignIn.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/backSignInPressed.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/backSignIn.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/backSignIn.png);\n" "}") self.button_backToSignIn.setText("") self.button_backToSignIn.setObjectName("button_backToSignIn") self.button_close_2 = QtWidgets.QPushButton(self.signupPage) self.button_close_2.setGeometry(QtCore.QRect(940, 40, 21, 21)) self.button_close_2.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/exitBlue.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/exitRed.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/exitRed.png);\n" "}") self.button_close_2.setText("") self.button_close_2.setObjectName("button_close_2") self.stackedWidget.addWidget(self.signupPage) self.faceidPage = QtWidgets.QWidget() self.faceidPage.setStyleSheet( "border-image: url(:/Images/Resources/faceIDWidget.png);") self.faceidPage.setObjectName("faceidPage") self.label_cam = QtWidgets.QLabel(self.faceidPage) self.label_cam.setGeometry(QtCore.QRect(90, 230, 821, 401)) self.label_cam.setStyleSheet( "border-image: url(:/Images/Resources/semiDarkBG.png);") self.label_cam.setText("") self.label_cam.setObjectName("label_cam") self.stackedWidget.addWidget(self.faceidPage) self.mainPage = QtWidgets.QWidget() self.mainPage.setStyleSheet( "border-image: url(:/Images/Resources/mainWidgetBG.png);") self.mainPage.setObjectName("mainPage") self.button_dashboard = QtWidgets.QPushButton(self.mainPage) self.button_dashboard.setGeometry(QtCore.QRect(0, 230, 291, 54)) self.button_dashboard.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/dasboard.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/dashboardPressed.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/dashboardPressed.png);\n" "}") self.button_dashboard.setText("") self.button_dashboard.setObjectName("button_dashboard") self.button_createTank = QtWidgets.QPushButton(self.mainPage) self.button_createTank.setGeometry(QtCore.QRect(0, 290, 291, 54)) self.button_createTank.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/create.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/createPressed.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/createPressed.png);\n" "}") self.button_createTank.setText("") self.button_createTank.setObjectName("button_createTank") self.button_analyzeTank = QtWidgets.QPushButton(self.mainPage) self.button_analyzeTank.setGeometry(QtCore.QRect(0, 350, 291, 54)) self.button_analyzeTank.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/analyze.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/analyzePressed.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/analyzePressed.png);\n" "}") self.button_analyzeTank.setText("") self.button_analyzeTank.setObjectName("button_analyzeTank") self.button_settings = QtWidgets.QPushButton(self.mainPage) self.button_settings.setGeometry(QtCore.QRect(0, 410, 291, 54)) self.button_settings.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/settings.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/settingsPressed.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/settingsPressed.png);\n" "}") self.button_settings.setText("") self.button_settings.setObjectName("button_settings") self.button_logout = QtWidgets.QPushButton(self.mainPage) self.button_logout.setGeometry(QtCore.QRect(78, 790, 130, 42)) self.button_logout.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/logoutPressed.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/logout.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/logout.png);\n" "}") self.button_logout.setText("") self.button_logout.setObjectName("button_logout") self.stackedWidget_2 = QtWidgets.QStackedWidget(self.mainPage) self.stackedWidget_2.setGeometry(QtCore.QRect(290, 0, 711, 861)) self.stackedWidget_2.setStyleSheet( "border-image: url(:/Images/Resources/CreateBG.png);") self.stackedWidget_2.setObjectName("stackedWidget_2") self.dashboardPage = QtWidgets.QWidget() self.dashboardPage.setStyleSheet( "border-image: url(:/Images/Resources/dashboardWidget.png);") self.dashboardPage.setObjectName("dashboardPage") self.label_fishType_tankData = QtWidgets.QLabel(self.dashboardPage) self.label_fishType_tankData.setGeometry(QtCore.QRect( 190, 176, 81, 16)) self.label_fishType_tankData.setStyleSheet( "border-image: url(:/Images/Resources/whiteBG.png);\n" "font: 11pt \"Helvetica LT Std\";") self.label_fishType_tankData.setObjectName("label_fishType_tankData") self.label_harvestDate_tankData = QtWidgets.QLabel(self.dashboardPage) self.label_harvestDate_tankData.setGeometry( QtCore.QRect(220, 225, 111, 16)) self.label_harvestDate_tankData.setStyleSheet( "border-image: url(:/Images/Resources/whiteBG.png);\n" "font: 11pt \"Helvetica LT Std\";") self.label_harvestDate_tankData.setObjectName( "label_harvestDate_tankData") self.label_feeding_tankData = QtWidgets.QLabel(self.dashboardPage) self.label_feeding_tankData.setGeometry(QtCore.QRect( 250, 273, 101, 16)) self.label_feeding_tankData.setStyleSheet( "border-image: url(:/Images/Resources/whiteBG.png);\n" "font: 11pt \"Helvetica LT Std\";") self.label_feeding_tankData.setObjectName("label_feeding_tankData") self.label_ph_tankData = QtWidgets.QLabel(self.dashboardPage) self.label_ph_tankData.setGeometry(QtCore.QRect(140, 324, 71, 16)) self.label_ph_tankData.setStyleSheet( "border-image: url(:/Images/Resources/whiteBG.png);\n" "font: 11pt \"Helvetica LT Std\";") self.label_ph_tankData.setObjectName("label_ph_tankData") self.label_temperature_tankData = QtWidgets.QLabel(self.dashboardPage) self.label_temperature_tankData.setGeometry( QtCore.QRect(210, 370, 500, 20)) self.label_temperature_tankData.setStyleSheet( "border-image: url(:/Images/Resources/whiteBG.png);\n" "color: rgb(255, 61, 55);\n" "font: 11pt \"Helvetica LT Std\";") self.label_temperature_tankData.setObjectName( "label_temperature_tankData") self.label_fishNetHoles_tankData = QtWidgets.QLabel(self.dashboardPage) self.label_fishNetHoles_tankData.setGeometry( QtCore.QRect(220, 418, 71, 16)) self.label_fishNetHoles_tankData.setStyleSheet( "border-image: url(:/Images/Resources/whiteBG.png);\n" "font: 11pt \"Helvetica LT Std\";") self.label_fishNetHoles_tankData.setObjectName( "label_fishNetHoles_tankData") self.label_fishnetNeedsCleaning_tankData = QtWidgets.QLabel( self.dashboardPage) self.label_fishnetNeedsCleaning_tankData.setGeometry( QtCore.QRect(290, 465, 55, 16)) self.label_fishnetNeedsCleaning_tankData.setStyleSheet( "border-image: url(:/Images/Resources/whiteBG.png);\n" "font: 11pt \"Helvetica LT Std\";") self.label_fishnetNeedsCleaning_tankData.setObjectName( "label_fishnetNeedsCleaning_tankData") self.label_pipesNeedChanging_tankData = QtWidgets.QLabel( self.dashboardPage) self.label_pipesNeedChanging_tankData.setGeometry( QtCore.QRect(280, 513, 55, 16)) self.label_pipesNeedChanging_tankData.setStyleSheet( "border-image: url(:/Images/Resources/whiteBG.png);\n" "font: 11pt \"Helvetica LT Std\";") self.label_pipesNeedChanging_tankData.setObjectName( "label_pipesNeedChanging_tankData") self.comboBox = QtWidgets.QComboBox(self.dashboardPage) self.comboBox.setGeometry(QtCore.QRect(300, 70, 128, 33)) self.comboBox.setStyleSheet( "QComboBox {\n" "border-image: url(:/Resources/comboBoxBG.png);\n" " border-image: url(:/Images/Resources/comboBoxBG.png);\n" " color: black;\n" " font: 14px;\n" " padding: 1px 0px 1px 3px; /* This (useless) line resolves a bug with the font color */\n" "}\n" "\n" "QComboBox:focus {\n" " color: red;\n" "}\n" "\n" "QComboBox::drop-down \n" "{\n" " border: 0px; /* This seems to replace the whole arrow of the combo box */\n" "}") self.comboBox.setObjectName("comboBox") self.comboBox.addItem("") self.button_email = QtWidgets.QPushButton(self.dashboardPage) self.button_email.setGeometry(QtCore.QRect(220, 810, 127, 33)) self.button_email.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/EmailButton.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/EmailButtonPressed.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/EmailButtonPressed.png);\n" "}") self.button_email.setText("") self.button_email.setObjectName("button_email") self.button_report = QtWidgets.QPushButton(self.dashboardPage) self.button_report.setGeometry(QtCore.QRect(370, 810, 127, 33)) self.button_report.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/report.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/reportPressed.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/reportPressed.png);\n" "}") self.button_report.setText("") self.button_report.setObjectName("button_report") self.button_close_3 = QtWidgets.QPushButton(self.dashboardPage) self.button_close_3.setGeometry(QtCore.QRect(670, 40, 21, 21)) self.button_close_3.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/exitBlue.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/exitGrey.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/exitGrey.png);\n" "}") self.button_close_3.setText("") self.button_close_3.setObjectName("button_close_3") self.stackedWidget_2.addWidget(self.dashboardPage) self.createtankPage = QtWidgets.QWidget() self.createtankPage.setObjectName("createtankPage") self.lineEdit_fishType_createTank = QtWidgets.QLineEdit( self.createtankPage) self.lineEdit_fishType_createTank.setGeometry( QtCore.QRect(480, 490, 71, 31)) self.lineEdit_fishType_createTank.setStyleSheet( "border-image: url(:/Images/Resources/darkBlackBG.png);\n" "color: rgb(167, 167, 167);") self.lineEdit_fishType_createTank.setObjectName( "lineEdit_fishType_createTank") self.lineEdit_date_createTank = QtWidgets.QLineEdit( self.createtankPage) self.lineEdit_date_createTank.setGeometry( QtCore.QRect(480, 540, 101, 22)) self.lineEdit_date_createTank.setStyleSheet( "border-image: url(:/Images/Resources/darkBlackBG.png);\n" "color: rgb(167, 167, 167);") self.lineEdit_date_createTank.setObjectName("lineEdit_date_createTank") self.lineEdit_feeding_createTank = QtWidgets.QLineEdit( self.createtankPage) self.lineEdit_feeding_createTank.setGeometry( QtCore.QRect(480, 590, 61, 22)) self.lineEdit_feeding_createTank.setStyleSheet( "border-image: url(:/Images/Resources/darkBlackBG.png);\n" "color: rgb(167, 167, 167);") self.lineEdit_feeding_createTank.setObjectName( "lineEdit_feeding_createTank") self.lineEdit_lowerTemperatureThreshold_createTank = QtWidgets.QLineEdit( self.createtankPage) self.lineEdit_lowerTemperatureThreshold_createTank.setGeometry( QtCore.QRect(480, 640, 81, 22)) self.lineEdit_lowerTemperatureThreshold_createTank.setStyleSheet( "border-image: url(:/Images/Resources/darkBlackBG.png);\n" "color: rgb(167, 167, 167);") self.lineEdit_lowerTemperatureThreshold_createTank.setObjectName( "lineEdit_lowerTemperatureThreshold_createTank") self.lineEdit_upperTemperatureThreshold_createTank = QtWidgets.QLineEdit( self.createtankPage) self.lineEdit_upperTemperatureThreshold_createTank.setGeometry( QtCore.QRect(480, 690, 81, 22)) self.lineEdit_upperTemperatureThreshold_createTank.setStyleSheet( "border-image: url(:/Images/Resources/darkBlackBG.png);\n" "color: rgb(167, 167, 167);") self.lineEdit_upperTemperatureThreshold_createTank.setObjectName( "lineEdit_upperTemperatureThreshold_createTank") self.lineEdit_waterQualityThreshold_createTank = QtWidgets.QLineEdit( self.createtankPage) self.lineEdit_waterQualityThreshold_createTank.setGeometry( QtCore.QRect(480, 740, 81, 22)) self.lineEdit_waterQualityThreshold_createTank.setStyleSheet( "border-image: url(:/Images/Resources/darkBlackBG.png);\n" "color: rgb(167, 167, 167);") self.lineEdit_waterQualityThreshold_createTank.setObjectName( "lineEdit_waterQualityThreshold_createTank") self.button_create_createTank = QtWidgets.QPushButton( self.createtankPage) self.button_create_createTank.setGeometry( QtCore.QRect(290, 810, 127, 33)) self.button_create_createTank.setStyleSheet( "border-image: url(:/Images/Resources/createButton.png);") self.button_create_createTank.setText("") self.button_create_createTank.setObjectName("button_create_createTank") self.button_close_4 = QtWidgets.QPushButton(self.createtankPage) self.button_close_4.setGeometry(QtCore.QRect(670, 40, 21, 21)) self.button_close_4.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/exitWhiteBlue.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/exitRed.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/exitRed.png);\n" "}") self.button_close_4.setText("") self.button_close_4.setObjectName("button_close_4") self.stackedWidget_2.addWidget(self.createtankPage) self.analyzetankPage = QtWidgets.QWidget() self.analyzetankPage.setStyleSheet( "border-image: url(:/Images/Resources/AnalyzeBG.png);") self.analyzetankPage.setObjectName("analyzetankPage") self.button_holes_analyzeTank = QtWidgets.QPushButton( self.analyzetankPage) self.button_holes_analyzeTank.setGeometry( QtCore.QRect(150, 530, 127, 33)) self.button_holes_analyzeTank.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/Holes.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/HolesPressed.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/HolesPressed.png);\n" "}") self.button_holes_analyzeTank.setText("") self.button_holes_analyzeTank.setObjectName("button_holes_analyzeTank") self.button_cleaning_analyzeTank = QtWidgets.QPushButton( self.analyzetankPage) self.button_cleaning_analyzeTank.setGeometry( QtCore.QRect(300, 530, 127, 33)) self.button_cleaning_analyzeTank.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/Cleaning.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/CleaningPressed.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/CleaningPressed.png);\n" "}") self.button_cleaning_analyzeTank.setText("") self.button_cleaning_analyzeTank.setObjectName( "button_cleaning_analyzeTank") self.button_pipes_analyzeTank = QtWidgets.QPushButton( self.analyzetankPage) self.button_pipes_analyzeTank.setGeometry( QtCore.QRect(450, 530, 127, 33)) self.button_pipes_analyzeTank.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/Pipes.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/PipesPressed.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/PipesPressed.png);\n" "}") self.button_pipes_analyzeTank.setText("") self.button_pipes_analyzeTank.setObjectName("button_pipes_analyzeTank") self.button_predict_analyzeTank = QtWidgets.QPushButton( self.analyzetankPage) self.button_predict_analyzeTank.setGeometry( QtCore.QRect(440, 740, 222, 34)) self.button_predict_analyzeTank.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/predict.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/predictPressed.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/predictPressed.png);\n" "}") self.button_predict_analyzeTank.setText("") self.button_predict_analyzeTank.setObjectName( "button_predict_analyzeTank") self.label_fishnetNeedsPatching_analyzeTank = QtWidgets.QLabel( self.analyzetankPage) self.label_fishnetNeedsPatching_analyzeTank.setGeometry( QtCore.QRect(300, 613, 55, 16)) self.label_fishnetNeedsPatching_analyzeTank.setStyleSheet( "border-image: url(:/Images/Resources/whiteBG.png);\n" "font: 11pt \"Helvetica LT Std\";") self.label_fishnetNeedsPatching_analyzeTank.setObjectName( "label_fishnetNeedsPatching_analyzeTank") self.label_fishnetNeedsCleaning_analyzeTank = QtWidgets.QLabel( self.analyzetankPage) self.label_fishnetNeedsCleaning_analyzeTank.setGeometry( QtCore.QRect(300, 655, 55, 16)) self.label_fishnetNeedsCleaning_analyzeTank.setStyleSheet( "border-image: url(:/Images/Resources/whiteBG.png);\n" "font: 11pt \"Helvetica LT Std\";") self.label_fishnetNeedsCleaning_analyzeTank.setObjectName( "label_fishnetNeedsCleaning_analyzeTank") self.label_pipesNeedChanging_analyzeTank = QtWidgets.QLabel( self.analyzetankPage) self.label_pipesNeedChanging_analyzeTank.setGeometry( QtCore.QRect(300, 705, 55, 16)) self.label_pipesNeedChanging_analyzeTank.setStyleSheet( "border-image: url(:/Images/Resources/whiteBG.png);\n" "font: 11pt \"Helvetica LT Std\";") self.label_pipesNeedChanging_analyzeTank.setObjectName( "label_pipesNeedChanging_analyzeTank") self.lineEdit_temperature_analyzeTank = QtWidgets.QLineEdit( self.analyzetankPage) self.lineEdit_temperature_analyzeTank.setGeometry( QtCore.QRect(570, 610, 113, 22)) self.lineEdit_temperature_analyzeTank.setStyleSheet( "border-image: url(:/Images/Resources/whiteBG.png);\n" "font: 11pt \"Helvetica LT Std\";") self.lineEdit_temperature_analyzeTank.setObjectName( "lineEdit_temperature_analyzeTank") self.lineEdit_waterSalinity_analyzeTank = QtWidgets.QLineEdit( self.analyzetankPage) self.lineEdit_waterSalinity_analyzeTank.setGeometry( QtCore.QRect(570, 700, 113, 22)) self.lineEdit_waterSalinity_analyzeTank.setStyleSheet( "border-image: url(:/Images/Resources/whiteBG.png);\n" "font: 11pt \"Helvetica LT Std\";") self.lineEdit_waterSalinity_analyzeTank.setObjectName( "lineEdit_waterSalinity_analyzeTank") self.label_camFeed = QtWidgets.QLabel(self.analyzetankPage) self.label_camFeed.setGeometry(QtCore.QRect(80, 200, 551, 281)) self.label_camFeed.setStyleSheet( "border-image: url(:/Images/Resources/semiDarkBG.png);") self.label_camFeed.setText("") self.label_camFeed.setObjectName("label_camFeed") self.button_close_5 = QtWidgets.QPushButton(self.analyzetankPage) self.button_close_5.setGeometry(QtCore.QRect(670, 40, 21, 21)) self.button_close_5.setStyleSheet( "QPushButton{\n" " border-image: url(:/Images/Resources/exitBlue.png);\n" "background-repeat: none;\n" "}\n" "\n" "QPushButton:hover{\n" " border-image: url(:/Images/Resources/exitGrey.png);\n" "}\n" "\n" "QPushButton:pressed{\n" " border-image: url(:/Images/Resources/exitGrey.png);\n" "}") self.button_close_5.setText("") self.button_close_5.setObjectName("button_close_5") self.stackedWidget_2.addWidget(self.analyzetankPage) self.settingsPage = QtWidgets.QWidget() self.settingsPage.setStyleSheet( "border-image: url(:/Images/Resources/settingsWidget.png);") self.settingsPage.setObjectName("settingsPage") self.stackedWidget_2.addWidget(self.settingsPage) self.label_username_mainPage = QtWidgets.QLabel(self.mainPage) self.label_username_mainPage.setGeometry( QtCore.QRect(120, 137, 141, 41)) self.label_username_mainPage.setStyleSheet( "border-image: url(:/Images/Resources/blueBG.png);\n" "font: 11pt \"Helvetica LT Std\";\n" "color: rgb(229, 229, 229);") self.label_username_mainPage.setObjectName("label_username_mainPage") self.label_userLetter = QtWidgets.QLabel(self.mainPage) self.label_userLetter.setGeometry(QtCore.QRect(50, 137, 31, 31)) self.label_userLetter.setStyleSheet( "border-image: url(:/Images/Resources/greyBG.png);\n" "font: 75 26pt \"Helvetica LT Std\";") self.label_userLetter.setObjectName("label_userLetter") self.stackedWidget.addWidget(self.mainPage) MainWindow.setCentralWidget(self.centralwidget) self.buttonsConnections() self.retranslateUi(MainWindow) self.stackedWidget.setCurrentIndex(0) self.button_close.clicked.connect(MainWindow.close) self.button_close_5.clicked.connect(MainWindow.close) self.button_close_2.clicked.connect(MainWindow.close) self.button_close_3.clicked.connect(MainWindow.close) self.button_close_4.clicked.connect(MainWindow.close) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.lineEdit_username_signIn.setText(_translate("MainWindow", "")) self.lineEdit_password_signIn.setText(_translate("MainWindow", "")) self.lineEdit_firstName_signUp.setText( _translate("MainWindow", "First name")) self.lineEdit_lastName_signUp.setText( _translate("MainWindow", "Last name")) self.lineEdit_email_signUp.setText( _translate("MainWindow", "Email address")) self.lineEdit_username_signUp.setText( _translate("MainWindow", "Username")) self.lineEdit_password_signUp.setText( _translate("MainWindow", "Password")) self.label_fishType_tankData.setText(_translate( "MainWindow", "Salmon")) self.label_harvestDate_tankData.setText( _translate("MainWindow", "29/7/2019")) self.label_feeding_tankData.setText(_translate("MainWindow", "6:00:00")) self.label_ph_tankData.setText(_translate("MainWindow", "5")) self.label_temperature_tankData.setText(_translate("MainWindow", "22")) self.label_fishNetHoles_tankData.setText(_translate("MainWindow", "1")) self.label_fishnetNeedsCleaning_tankData.setText( _translate("MainWindow", "No")) self.label_pipesNeedChanging_tankData.setText( _translate("MainWindow", "No")) self.comboBox.setItemText(0, _translate("MainWindow", "Tank 1")) self.lineEdit_fishType_createTank.setText( _translate("MainWindow", "Salmon")) self.lineEdit_date_createTank.setText( _translate("MainWindow", "DD/MM/YY")) self.lineEdit_feeding_createTank.setText(_translate( "MainWindow", "DD")) self.lineEdit_lowerTemperatureThreshold_createTank.setText( _translate("MainWindow", "18")) self.lineEdit_upperTemperatureThreshold_createTank.setText( _translate("MainWindow", "24")) self.lineEdit_waterQualityThreshold_createTank.setText( _translate("MainWindow", "0.9")) self.label_fishnetNeedsPatching_analyzeTank.setText( _translate("MainWindow", "No")) self.label_fishnetNeedsCleaning_analyzeTank.setText( _translate("MainWindow", "No")) self.label_pipesNeedChanging_analyzeTank.setText( _translate("MainWindow", "No")) self.lineEdit_temperature_analyzeTank.setText( _translate("MainWindow", "24")) self.lineEdit_waterSalinity_analyzeTank.setText( _translate("MainWindow", "21")) self.label_username_mainPage.setText( _translate("MainWindow", "Abdullah Salah")) self.label_userLetter.setText(_translate("MainWindow", "A")) def signInIsClicked(self): username_signIn = self.lineEdit_username_signIn.text() password_signIn = self.lineEdit_password_signIn.text() self.label_temperature_tankData.setText("18.43") self.user = self.db.authenticateLogIn(username_signIn, password_signIn) self.tankList = self.db.loadTankList(self.user.getUserID()) self.numberOfTanks = len(self.tankList) self.label_userLetter.setText("R") for i in range(self.numberOfTanks - 2): name = "Tank" + str(i + 2) self.comboBox.addItem(name) self.tankIndex = self.comboBox.currentIndex() self.waterQualityList = self.db.loadWaterQualityList( self.tankList[self.tankIndex].getTankID()) self.sen = Sensors("http://192.168.43.223/") if (self.user): self.displayList(self.tankIndex) self.stackedWidget.setCurrentIndex(3) self.cam.start() self.camTimer.timeout.connect(lambda: self.camFeedFunc()) self.camTimer.start(100) else: print("INVALID USERNAME OR PASSWORD") def camFeedFunc(self): self.fr = self.cam.getFrame() self.im = cv2.imread( "/Users/rowanhisham/Desktop/833a7b77-7744-4662-b1b9-5a22c948285b.jpg", 1) frame = cv2.cvtColor(self.im, cv2.COLOR_BGR2RGB) img = QtGui.QImage(frame, frame.shape[1], frame.shape[0], QtGui.QImage.Format_RGB888) pix = QtGui.QPixmap.fromImage(img) self.label_camFeed.setScaledContents(True) self.label_camFeed.setPixmap(pix) def captureImage(self): return self.im # return self.fr.copy() def displayList(self, tankIndex): if (self.user): self.label_username_mainPage.setText(self.user.getFirstName() + " " + self.user.getLastName()) # self.label_user_admin.setText("") self.label_fishType_tankData.setText( self.tankList[tankIndex].getFishType()) self.label_harvestDate_tankData.setText( self.tankList[tankIndex].getHarvestDate()) self.label_feeding_tankData.setText( self.tankList[tankIndex].getFeedingSchedule()) self.label_ph_tankData.setText( str(self.waterQualityList[0].getpH())) self.temperatureReading() def temperatureReading(self): print("temp timerrrrr") self.temp = self.sen.getTemperature() if (float(self.temp) >= 18): self.label_temperature_tankData.setText( "WARNING! Temperature is " + self.temp + " C") self.em = emailNotifier(self.user, self.temp) self.em.sendEmail() else: self.label_temperature_tankData.setText(self.sen.getTemperature()) def updateTankData(self): self.tankIndex = self.comboBox.currentIndex() self.displayList(self.tankIndex) def signUpfromLoginPageIsClicked(self): self.stackedWidget.setCurrentIndex(1) def signUpfromsignUpPageIsClicked(self): self.stackedWidget.setCurrentIndex(0) username_signUp = self.lineEdit_username_signUp.text() password_signUp = self.lineEdit_password_signUp.text() firstName_signUp = self.lineEdit_firstName_signUp.text() lastName_signUp = self.lineEdit_lastName_signUp.text() email_signUp = self.lineEdit_email_signUp.text() def faceIdIsClicked(self): self.stackedWidget.setCurrentIndex(2) def goToLoginPage(self): self.stackedWidget.setCurrentIndex(0) def dashboardIsClicked(self): self.stackedWidget_2.setCurrentIndex(0) def createTankIsClicked(self): self.stackedWidget_2.setCurrentIndex(1) def createTankButtonClicked(self): fishType_createTank = self.lineEdit_fishType_createTank.text() date_createTank = self.lineEdit_date_createTank.text() feeding_createTank = self.lineEdit_feeding_createTank.text() lowerTemperatureThreshold_createTank = self.lineEdit_lowerTemperatureThreshold_createTank.text( ) upperTemperatureThreshold_createTank = self.lineEdit_upperTemperatureThreshold_createTank.text( ) waterQualityThreshold_createTank = self.lineEdit_waterQualityThreshold_createTank.text( ) def reportIsClicked(self): webbrowser.open( "https://app.powerbi.com/view?r=eyJrIjoiZjhkMzViNTUtMDU3Yy00NTBhLTg1OWUtZjU1OGU1NzcyZjFiIiwidCI6ImVhZjYyNGM4LWEwYzQtNDE5NS04N2QyLTQ0M2U1ZDc1MTZjZCIsImMiOjh9&fbclid=IwAR29_qNsg6Nwu1QKUFX6OjKhhUDT77pEpZHJDb0ZE1-OwoRCjhy1En90DAc" ) def emailIsClicked(self): pass def analyzeTankIsClicked(self): self.stackedWidget_2.setCurrentIndex(2) def settingsIsClicked(self): self.stackedWidget_2.setCurrentIndex(3) def cleaningIsClicked(self): pred = self.clean.predict(self.captureImage()) if (pred == "yes"): self.label_fishnetNeedsCleaning_analyzeTank.setText("Yes") elif (pred == "no"): self.label_fishnetNeedsCleaning_analyzeTank.setText("No") else: self.label_fishnetNeedsCleaning_analyzeTank.setText( "Can't determine") def holesIsClicked(self): pred = self.holes.predict(self.captureImage()) if (pred == "yes"): self.label_fishnetNeedsPatching_analyzeTank.setText("Yes") elif (pred == "no"): self.label_fishnetNeedsPatching_analyzeTank.setText("No") else: self.label_fishnetNeedsPatching_analyzeTank.setText( "Can't determine") def pipesIsClicked(self): pass def predictIsClicked(self): pass def buttonsConnections(self): self.button_signIn_signIn.clicked.connect(self.signInIsClicked) self.button_signUp_signIn.clicked.connect( self.signUpfromLoginPageIsClicked) self.button_faceID_signIn.clicked.connect(self.faceIdIsClicked) self.button_backToSignIn.clicked.connect(self.goToLoginPage) self.button_signUp_signUp.clicked.connect( self.signUpfromsignUpPageIsClicked) self.button_logout.clicked.connect(self.goToLoginPage) self.button_dashboard.clicked.connect(self.dashboardIsClicked) self.button_createTank.clicked.connect(self.createTankIsClicked) self.button_analyzeTank.clicked.connect(self.analyzeTankIsClicked) self.button_settings.clicked.connect(self.settingsIsClicked) self.button_cleaning_analyzeTank.clicked.connect( self.cleaningIsClicked) self.button_holes_analyzeTank.clicked.connect(self.holesIsClicked) self.button_pipes_analyzeTank.clicked.connect(self.pipesIsClicked) self.button_predict_analyzeTank.clicked.connect(self.predictIsClicked) self.button_create_createTank.clicked.connect( self.createTankButtonClicked) self.button_report.clicked.connect(self.reportIsClicked) self.button_email.clicked.connect(self.emailIsClicked) self.comboBox.currentIndexChanged.connect(self.updateTankData)