| 69 | self.ok_button.setFocus() |
| 70 | |
| 71 | def open_project(self): |
| 72 | if self.config == "": |
| 73 | msg = QtWidgets.QMessageBox() |
| 74 | msg.setIcon(QtWidgets.QMessageBox.Critical) |
| 75 | msg.setText("Please choose the config.yaml file to load the project") |
| 76 | |
| 77 | msg.setWindowTitle("Error") |
| 78 | msg.setMinimumWidth(400) |
| 79 | self.logo_dir = os.path.dirname(os.path.realpath("logo.png")) + os.path.sep |
| 80 | self.logo = self.logo_dir + "/assets/logo.png" |
| 81 | msg.setWindowIcon(QIcon(self.logo)) |
| 82 | msg.setStandardButtons(QtWidgets.QMessageBox.Ok) |
| 83 | msg.exec_() |
| 84 | |
| 85 | self.loaded = False |
| 86 | else: |
| 87 | self.logo_dir = os.path.dirname(os.path.realpath("logo.png")) + os.path.sep |
| 88 | self.logo = self.logo_dir + "/assets/logo.png" |
| 89 | |
| 90 | self.loaded = True |
| 91 | self.accept() |
| 92 | self.close() |