Toolbox for analyzing and editing pkg application files for psp,ps3, ps4 and ps5, includes the most useful functions you might need.
| 1 | from logging import Logger |
| 2 | from PyQt5.QtWidgets import QMessageBox |
| 3 | |
| 4 | class MessageBoxHelper: |
| 5 | @staticmethod |
| 6 | def show_information(message, logging): |
| 7 | if logging: |
| 8 | Logger.log_information(message) |
| 9 | QMessageBox.information(None, "PS4 PKG Tool", message) |
| 10 | |
| 11 | @staticmethod |
| 12 | def show_error(message, logging): |
| 13 | if logging: |
| 14 | Logger.log_error(message) |
| 15 | QMessageBox.critical(None, "PS4 PKG Tool", message) |
| 16 | |
| 17 | @staticmethod |
| 18 | def show_warning(message, logging): |
| 19 | if logging: |
| 20 | Logger.log_warning(message) |
| 21 | QMessageBox.warning(None, "PS4 PKG Tool", message) |
| 22 | |
| 23 | @staticmethod |
| 24 | def dialog_result_yes_no(message): |
| 25 | return QMessageBox.question(None, "PS4 PKG Tool", message, QMessageBox.Yes | QMessageBox.No) |
| 26 | |
| 27 | @staticmethod |
| 28 | def dialog_result_yes_no_cancel(message): |
| 29 | return QMessageBox.question(None, "PS4 PKG Tool", message, QMessageBox.Yes | QMessageBox.No | QMessageBox.Cancel) |