def pausePushButtonPressed(self, button): if self.status == "downloading": answer = download.downloadPause(self.gid) # if aria2 did not respond , then this function is checking for aria2 # availability , and if aria2 disconnected then aria2Disconnected is # executed if not (answer): version_answer = download.aria2Version() if version_answer == 'did not respond': self.parent.aria2Disconnected() download.downloadStop(self.gid, self.parent) notifySend("Aria2 disconnected!", "Persepolis is trying to connect! be patient!", 10000, 'warning', parent=self.parent) else: notifySend( QCoreApplication.translate("progress_src_ui_tr", "Aria2 did not respond!"), QCoreApplication.translate("progress_src_ui_tr", "Try again!"), 10000, 'critical', parent=self.parent)
def retranslateUi(self, audioOp): self.comboBox.setItemText(0, QCoreApplication.translate("Form", u"Mixed section and step audio", None)) self.comboBox.setItemText(1, QCoreApplication.translate("Form", u"Section audio only", None)) self.comboBox.setItemText(2, QCoreApplication.translate("Form", u"Step audio only", None)) self.label_8.setText(QCoreApplication.translate("Form", u"Audio attachment behavior", None)) pass
def stopPushButtonPressed(self, button): # cancel shut down progress dictionary = { 'category': self.video_finder_plus_gid, 'shutdown': 'canceled' } self.parent.temp_db.updateQueueTable(dictionary) answer = download.downloadStop(self.gid, self.parent) # if aria2 did not respond , then this function is checking for aria2 # availability , and if aria2 disconnected then aria2Disconnected is # executed if answer == 'None': version_answer = download.aria2Version() if version_answer == 'did not respond': self.parent.aria2Disconnected() notifySend(QCoreApplication.translate("progress_src_ui_tr", "Aria2 disconnected!"), QCoreApplication.translate( "progress_src_ui_tr", "Persepolis is trying to connect! be patient!"), 10000, 'warning', parent=self.parent)
def __init__(self, persepolis_setting): super().__init__(persepolis_setting) # status_tab self.status_tab = QWidget() status_tab_verticalLayout = QVBoxLayout(self.status_tab) # video_status_label self.video_status_label = QLabel(self.status_tab) status_tab_verticalLayout.addWidget(self.video_status_label) # audio_status_label self.audio_status_label = QLabel(self.status_tab) status_tab_verticalLayout.addWidget(self.audio_status_label) # muxing_status_label self.muxing_status_label = QLabel(self.status_tab) status_tab_verticalLayout.addWidget(self.muxing_status_label) self.progress_tabWidget.addTab(self.status_tab, "") # set status_tab as default tab self.progress_tabWidget.setCurrentIndex(2) # labels self.video_status_label.setText(QCoreApplication.translate( "video_finder_progress_ui_tr", "<b>Video file status: </b>")) self.audio_status_label.setText(QCoreApplication.translate( "video_finder_progress_ui_tr", "<b>Audio file status: </b>")) self.muxing_status_label.setText(QCoreApplication.translate( "video_finder_progress_ui_tr", "<b>Mixing status: </b>")) self.progress_tabWidget.setTabText(self.progress_tabWidget.indexOf( self.status_tab), QCoreApplication.translate("setting_ui_tr", "Status"))
def retranslateUi(self, CategoryReportWidget): CategoryReportWidget.setWindowTitle( QCoreApplication.translate("CategoryReportWidget", u"Report by category", None)) self.ReportCategoryLbl.setText( QCoreApplication.translate("CategoryReportWidget", u"Category:", None))
def uninstall(self): """Create threads to uninstall selected apps after confirmation.""" apps = len(self.selected_apps) confirm_uninstall = QCoreApplication.translate("MessageBox", "Uninstall %n app(s)?", "", apps) space_freed_text = QCoreApplication.translate( "MessageBox", "MB of space will be freed.") msg_uninstall = f"{confirm_uninstall}\n\n{self.total_size:.2f} {space_freed_text}" if self.message_box(msg_uninstall, 2) == QMessageBox.Yes: for widget in self.main_widgets: widget.setEnabled(False) ui.label_info.hide() self.progress = 0 ui.progressbar.setMaximum(apps) ui.progressbar.show() self.new_thread_list = [] for item, i in enumerate(self.selected_apps): i.setEnabled(False) i.setChecked(False) self.new_thread_list.append(UninstallApps(self.apps_dict, i)) self.new_thread_list[item].signals.progress_signal.connect( self.uninstall_progress) self.newPoolThread = RunThreadPool(self.new_thread_list) self.newPoolThread.start()
def main(): parser = argparse.ArgumentParser() parser.add_argument("--nintendont", help="Connect to the given IP via the Nintendont protocol instead.") args = parser.parse_args() app = QCoreApplication(sys.argv) os.environ['QT_API'] = "PySide6" import qasync loop = qasync.QEventLoop(app) asyncio.set_event_loop(loop) logging.config.dictConfig({ 'version': 1, 'formatters': { 'default': { 'format': '[%(asctime)s] [%(levelname)s] [%(name)s] %(funcName)s: %(message)s', } }, 'handlers': { 'default': { 'level': 'DEBUG', 'formatter': 'default', 'class': 'logging.StreamHandler', 'stream': 'ext://sys.stdout', # Default is stderr }, }, 'loggers': { }, 'root': { 'level': 'DEBUG', 'handlers': ['default'], }, }) def catch_exceptions(t, val, tb): global should_quit should_quit = True old_hook(t, val, tb) def catch_exceptions_async(loop, context): if 'future' in context: future: asyncio.Future = context['future'] logging.exception(context["message"], exc_info=future.exception()) else: logging.critical(str(context)) sys.excepthook = catch_exceptions loop.set_exception_handler(catch_exceptions_async) if args.nintendont is not None: executor = NintendontExecutor(args.nintendont) else: executor = DolphinExecutor() with loop: try: asyncio.get_event_loop().run_until_complete(worker(app, executor)) finally: app.quit()
def __init__(self, parent=None): QOpenGLWidget.__init__(self, parent) QOpenGLFunctions.__init__(self) self.core = "--coreprofile" in QCoreApplication.arguments() self.xRot = 0 self.yRot = 0 self.zRot = 0 self.lastPos = 0 self.logo = Logo() self.vao = QOpenGLVertexArrayObject() self.logoVbo = QOpenGLBuffer() self.program = QOpenGLShaderProgram() self.projMatrixLoc = 0 self.mvMatrixLoc = 0 self.normalMatrixLoc = 0 self.lightPosLoc = 0 self.proj = QMatrix4x4() self.camera = QMatrix4x4() self.world = QMatrix4x4() self.transparent = "--transparent" in QCoreApplication.arguments() if self.transparent: fmt = self.format() fmt.setAlphaBufferSize(8) self.setFormat(fmt)
def __init__(self, parent, dict, persepolis_setting): super().__init__(persepolis_setting) self.persepolis_setting = persepolis_setting self.dict = dict self.parent = parent # add support for other languages locale = str(self.persepolis_setting.value('settings/locale')) QLocale.setDefault(QLocale(locale)) self.translator = QTranslator() if self.translator.load(':/translations/locales/ui_' + locale, 'ts'): QCoreApplication.installTranslator(self.translator) # connecting buttons self.open_pushButtun.clicked.connect(self.openFile) self.open_folder_pushButtun.clicked.connect(self.openFolder) self.ok_pushButton.clicked.connect(self.okButtonPressed) # labels # find gid gid = self.dict['gid'] # get file_path from data base self.add_link_dict = self.parent.persepolis_db.searchGidInAddLinkTable(gid) file_path = self.add_link_dict['download_path'] # save_as self.save_as_lineEdit.setText(file_path) self.save_as_lineEdit.setToolTip(file_path) # link link = str(self.dict['link']) self.link_lineEdit.setText(link) self.link_lineEdit.setToolTip(link) # file_name window_title = str(self.dict['file_name']) file_name = QCoreApplication.translate("after_download_src_ui_tr", "<b>File name</b>: ") + \ window_title self.setWindowTitle(window_title) self.file_name_label.setText(file_name) # size size = QCoreApplication.translate("after_download_src_ui_tr", "<b>Size</b>: ") + str(self.dict['size']) self.size_label.setText(size) # disable link_lineEdit and save_as_lineEdit self.link_lineEdit.setEnabled(False) self.save_as_lineEdit.setEnabled(False) # set window size and position size = self.persepolis_setting.value( 'AfterDownloadWindow/size', QSize(570, 290)) position = self.persepolis_setting.value( 'AfterDownloadWindow/position', QPoint(300, 300)) self.resize(size) self.move(position)
def retranslateUi(self, DealsReportWidget): DealsReportWidget.setWindowTitle( QCoreApplication.translate("DealsReportWidget", u"Deals", None)) self.ReportGroupCheck.setText( QCoreApplication.translate("DealsReportWidget", u"Group dates", None)) self.ReportAccountLbl.setText( QCoreApplication.translate("DealsReportWidget", u"Account:", None))
def retranslateUi(self, Dialog): Dialog.setWindowTitle( QCoreApplication.translate("Dialog", u"Dialog", None)) self.lbl_falhaLogar.setText( QCoreApplication.translate("Dialog", u"Falha ao logar usu\u00e1rio", None)) self.pushButton.setText( QCoreApplication.translate("Dialog", u"Ok", None))
def retranslateUi(self, HoldingsWidget): HoldingsWidget.setWindowTitle( QCoreApplication.translate("HoldingsWidget", u"Holdings", None)) self.HoldingsDate.setDisplayFormat( QCoreApplication.translate("HoldingsWidget", u"dd/MM/yyyy", None)) self.HoldingsCurrencyLbl.setText( QCoreApplication.translate("HoldingsWidget", u"Common currency:", None))
def retranslateUi(self, Dialog): Dialog.setWindowTitle( QCoreApplication.translate("Dialog", u"About {application_name}", None)) self.version_label.setText( QCoreApplication.translate("Dialog", u"Zero Play Version:", None)) self.version.setText(QCoreApplication.translate( "Dialog", u"0.0", None))
def retranslateUi(self, Dialog): Dialog.setWindowTitle( QCoreApplication.translate("Dialog", u"Dialog", None)) self.tbCreate.setText( QCoreApplication.translate("Dialog", u"\u65b0\u5efa", None)) self.tbAdd.setText( QCoreApplication.translate("Dialog", u"\u6dfb\u52a0", None)) self.tbRemove.setText( QCoreApplication.translate("Dialog", u"\u5220\u9664", None))
def __init__(self, parent, gid, persepolis_setting): super().__init__(persepolis_setting) self.persepolis_setting = persepolis_setting self.parent = parent self.gid = gid self.status = None self.resume_pushButton.clicked.connect(self.resumePushButtonPressed) self.stop_pushButton.clicked.connect(self.stopPushButtonPressed) self.pause_pushButton.clicked.connect(self.pausePushButtonPressed) self.download_progressBar.setValue(0) self.limit_pushButton.clicked.connect(self.limitPushButtonPressed) self.limit_frame.setEnabled(False) self.limit_checkBox.toggled.connect(self.limitCheckBoxToggled) self.after_frame.setEnabled(False) self.after_checkBox.toggled.connect(self.afterCheckBoxToggled) self.after_pushButton.clicked.connect(self.afterPushButtonPressed) # add support for other languages locale = str(self.persepolis_setting.value('settings/locale')) QLocale.setDefault(QLocale(locale)) self.translator = QTranslator() if self.translator.load(':/translations/locales/ui_' + locale, 'ts'): QCoreApplication.installTranslator(self.translator) # check if limit speed activated by user or not add_link_dictionary = self.parent.persepolis_db.searchGidInAddLinkTable( gid) limit = str(add_link_dictionary['limit_value']) if limit != '0': limit_number = limit[:-1] limit_unit = limit[-1] self.limit_spinBox.setValue(float(limit_number)) if limit_unit == 'K': self.after_comboBox.setCurrentIndex(0) else: self.after_comboBox.setCurrentIndex(1) self.limit_checkBox.setChecked(True) self.after_comboBox.currentIndexChanged.connect( self.afterComboBoxChanged) self.limit_comboBox.currentIndexChanged.connect( self.limitComboBoxChanged) self.limit_spinBox.valueChanged.connect(self.limitComboBoxChanged) # set window size and position size = self.persepolis_setting.value('ProgressWindow/size', QSize(595, 274)) position = self.persepolis_setting.value('ProgressWindow/position', QPoint(300, 300)) self.resize(size) self.move(position)
def retranslateUi(self, SelectAccountDlg): SelectAccountDlg.setWindowTitle( QCoreApplication.translate("SelectAccountDlg", u"Please select account", None)) self.DescriptionLbl.setText( QCoreApplication.translate("SelectAccountDlg", u"TextLabel", None)) self.ReuseAccount.setText( QCoreApplication.translate( "SelectAccountDlg", u"Use the same account for given currency", None))
def retranslateUi(self, shellTab): self.label.setText( QCoreApplication.translate("Form", u"Background", None)) #if QT_CONFIG(statustip) self.shellImgPath.setStatusTip( QCoreApplication.translate( "Form", u"Filepath of image to be used as shell for demo assets", None)) #endif // QT_CONFIG(statustip) self.shellBrowseImgBtn.setText( QCoreApplication.translate("Form", u"Browse", None)) self.label_2.setText( QCoreApplication.translate("Form", u"Coordinates of assets on shell", None)) self.label_3.setText(QCoreApplication.translate("Form", u"X", None)) self.label_4.setText(QCoreApplication.translate("Form", u"Y", None)) self.label_5.setText( QCoreApplication.translate("Form", u"Dimensions of assets on shell", None)) self.label_7.setText(QCoreApplication.translate( "Form", u"Width", None)) self.label_6.setText( QCoreApplication.translate("Form", u"Height", None)) pass
def retranslateUi(self, MainWindow): MainWindow.setWindowTitle( QCoreApplication.translate( "MainWindow", u"\u0418\u043c\u043f\u043e\u0440\u0442 \u0413\u0410\u0420", None)) self.groupBox.setTitle( QCoreApplication.translate( "MainWindow", u"\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b", None)) self.label.setText( QCoreApplication.translate("MainWindow", u"URL", None)) self.label_2.setText( QCoreApplication.translate("MainWindow", u"\u041f\u043e\u0440\u0442", None)) self.label_3.setText( QCoreApplication.translate("MainWindow", u"\u0418\u043c\u044f \u0411\u0414", None)) self.label_4.setText( QCoreApplication.translate( "MainWindow", u"\u0418\u043c\u044f \u0440\u043e\u043b\u0438", None)) self.label_5.setText( QCoreApplication.translate( "MainWindow", u"\u041f\u0430\u0440\u043e\u043b\u044c", None)) self.groupBox_2.setTitle( QCoreApplication.translate( "MainWindow", u"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430", None)) self.pushButton.setText( QCoreApplication.translate( "MainWindow", u"\u0418\u043c\u043f\u043e\u0440\u0442", None))
def retranslateUi(self, Setting): Setting.setWindowTitle( QCoreApplication.translate("Setting", u"\u8bbe\u7f6e", None)) self.label_8.setText( QCoreApplication.translate( "Setting", u"CPU\u6570\u91cf\uff08CPU\u6a21\u5f0f\u53ef\u7528\uff09", None)) self.threadSelect.setItemText( 0, QCoreApplication.translate("Setting", u"Auto", None)) self.label_3.setText( QCoreApplication.translate("Setting", u"CPU/GPU", None)) self.label.setText( QCoreApplication.translate("Setting", u"Language", None)) self.languageSelect.setItemText( 0, QCoreApplication.translate("Setting", u"Auto", None)) self.languageSelect.setItemText( 1, QCoreApplication.translate("Setting", u"\u4e2d\u6587\u7b80\u4f53", None)) self.languageSelect.setItemText( 2, QCoreApplication.translate("Setting", u"\u4e2d\u6587\u7e41\u4f53", None)) self.languageSelect.setItemText( 3, QCoreApplication.translate("Setting", u"English", None))
def retranslateUi(self, centralTabs): centralTabs.setWindowTitle( QCoreApplication.translate("centralTabs", u"Form", None)) centralTabs.setTabText( centralTabs.indexOf(self.demoPage), QCoreApplication.translate("centralTabs", u"Demo Utilities", None)) centralTabs.setTabText( centralTabs.indexOf(self.scriptsPage), QCoreApplication.translate("centralTabs", u"Script Studio", None)) centralTabs.setTabText( centralTabs.indexOf(self.productionPage), QCoreApplication.translate("centralTabs", u"Production", None))
def decodeError(orginal_msg): messages = { 'JAL_SQL_MSG_0001': QCoreApplication.translate( "Error", "Investment account should have associated broker assigned"), 'JAL_SQL_MSG_0002': QCoreApplication.translate("Error", "Can't delete predefined category") } if orginal_msg[:4] != 'JAL_': return orginal_msg code = orginal_msg[:16] return messages[code]
def retranslateUi(self, Form): Form.setWindowTitle( QCoreApplication.translate("Form", u"headers editor", None)) self.lineEdit_headers_path.setPlaceholderText( QCoreApplication.translate("Form", u"headers.json", None)) #if QT_CONFIG(tooltip) self.pushButton_select.setToolTip( QCoreApplication.translate( "Form", u"<html><head/><body><p>load headers.json file</p></body></html>", None)) #endif // QT_CONFIG(tooltip) self.pushButton_select.setText( QCoreApplication.translate("Form", u"select", None)) #if QT_CONFIG(tooltip) self.pushButton_save.setToolTip( QCoreApplication.translate( "Form", u"<html><head/><body><p>save to headers.json</p></body></html>", None)) #endif // QT_CONFIG(tooltip) self.pushButton_save.setText( QCoreApplication.translate("Form", u"save", None)) #if QT_CONFIG(tooltip) self.pushButton_add.setToolTip( QCoreApplication.translate( "Form", u"<html><head/><body><p>add a group of header key-value</p></body></html>", None)) #endif // QT_CONFIG(tooltip) self.pushButton_add.setText( QCoreApplication.translate("Form", u"add", None))
def retranslateUi(self, AssetDialog): AssetDialog.setWindowTitle(QCoreApplication.translate("AssetDialog", u"Asset", None)) self.SymbolsLabel.setText(QCoreApplication.translate("AssetDialog", u"Symbols", None)) self.AddSymbolButton.setText("") self.RemoveSymbolButton.setText("") self.DataLbl.setText(QCoreApplication.translate("AssetDialog", u"Extra data", None)) self.AddDataButton.setText("") self.RemoveDataButton.setText("") self.NameLbl.setText(QCoreApplication.translate("AssetDialog", u"Name:", None)) self.isinLbl.setText(QCoreApplication.translate("AssetDialog", u"ISIN:", None)) self.CancelButton.setText(QCoreApplication.translate("AssetDialog", u"Cancel", None)) self.OkButton.setText(QCoreApplication.translate("AssetDialog", u"OK", None)) self.BaseLbl.setText(QCoreApplication.translate("AssetDialog", u"Base asset:", None)) self.TypeLbl.setText(QCoreApplication.translate("AssetDialog", u"Type: ", None)) self.CountryLbl.setText(QCoreApplication.translate("AssetDialog", u"Country: ", None))
def retranslateUi(self, sectionOp): __sortingEnabled = self.sectionRulesListWidget.isSortingEnabled() self.sectionRulesListWidget.setSortingEnabled(False) ___qlistwidgetitem = self.sectionRulesListWidget.item(0) ___qlistwidgetitem.setText( QCoreApplication.translate("Form", u"Step has TP, next step without TP", None)) ___qlistwidgetitem1 = self.sectionRulesListWidget.item(1) ___qlistwidgetitem1.setText( QCoreApplication.translate("Form", u"Step has TP, next step with TP", None)) ___qlistwidgetitem2 = self.sectionRulesListWidget.item(2) ___qlistwidgetitem2.setText( QCoreApplication.translate( "Form", u"Step has TP, previous step without TP", None)) ___qlistwidgetitem3 = self.sectionRulesListWidget.item(3) ___qlistwidgetitem3.setText( QCoreApplication.translate("Form", u"Step has TP, previous step with TP", None)) ___qlistwidgetitem4 = self.sectionRulesListWidget.item(4) ___qlistwidgetitem4.setText( QCoreApplication.translate("Form", u"Step has fade-in", None)) ___qlistwidgetitem5 = self.sectionRulesListWidget.item(5) ___qlistwidgetitem5.setText( QCoreApplication.translate("Form", u"Step has jump box", None)) ___qlistwidgetitem6 = self.sectionRulesListWidget.item(6) ___qlistwidgetitem6.setText( QCoreApplication.translate("Form", u"Step TP contains text pattern...", None)) self.sectionRulesListWidget.setSortingEnabled(__sortingEnabled) self.label_10.setText( QCoreApplication.translate("Form", u"Insert new section on...", None)) self.sectionCoverageLabel.setText( QCoreApplication.translate( "Form", u"Covers 0 steps in selected sections/steps", None)) self.label_11.setText( QCoreApplication.translate( "Form", u"May not match number of audio soundbites (audio not imported)", None)) pass
def callBack(self, keys): # do nothing if keys is empty if not (keys): return # check that if shortcut used before. if keys in self.shortcuts_list: self.msgBox = QMessageBox() self.msgBox.setText( QCoreApplication.translate( "setting_src_ui_tr", "<b><center>This shortcut has been used before!\ Use another one!</center></b>")) self.msgBox.setIcon(QMessageBox.Warning) reply = self.msgBox.exec_() # set new shortcut else: selected_row = self.shortcut_table.selectionModel().selectedRows( )[0].row() item = QTableWidgetItem(keys) # align center item.setTextAlignment(0x0004 | 0x0080) # insert item in shortcut_table self.shortcut_table.setItem(selected_row, 1, item) # set keys in shortcuts_list self.shortcuts_list[selected_row] = keys
def submitClicked(self, button=None): # Clear media list self.media_comboBox.clear() self.format_selection_frame.hide() self.advanced_format_selection_checkBox.hide() self.advanced_format_selection_frame.hide() self.video_format_selection_comboBox.clear() self.audio_format_selection_comboBox.clear() self.change_name_lineEdit.clear() self.threadPool.clear() self.change_name_checkBox.setChecked(False) self.video_audio_list.clear() self.no_video_list.clear() self.no_audio_list.clear() self.url_submit_pushButtontton.setEnabled(False) self.status_box_textEdit.setText( QCoreApplication.translate("ytaddlink_src_ui_tr", 'Fetching Media Info...')) self.status_box_textEdit.show() self.ok_pushButton.setEnabled(False) self.download_later_pushButton.setEnabled(False) dictionary_to_send = deepcopy(self.plugin_add_link_dictionary) # More options more_options = self.collectMoreOptions() for k in more_options.keys(): dictionary_to_send[k] = more_options[k] dictionary_to_send['link'] = self.link_lineEdit.text() fetcher_thread = MediaListFetcherThread(self.fetchedResult, dictionary_to_send, self) self.parent.threadPool.append(fetcher_thread) self.parent.threadPool[len(self.parent.threadPool) - 1].start()
def __init__(self, path: str, script_path: str = "", audio_dir: str = "", verbose: bool = False, is_sectioned: bool = False, audio_attached: bool = False, parent: Any = QCoreApplication.instance()): super(QAbstractItemModel, self).__init__(parent) self.tree: ET._ElementTree = parse(path) self.root: ET._Element = self.tree.getroot() self.file: str = path self.verbose = verbose self.script_path: str = script_path self.audio_dir: str = audio_dir self.is_sectioned: bool = is_sectioned self.audio_attached: bool = audio_attached self.title: str = "" self.res: Tuple[int, int] = (0, 0) #TODO make changeable? self.len, self.sect_len = 0, 0 self.sections: List[Section] = [] self.steps: List[List] = [] self.lsect: List[List] = [] self.lstep: List[List] = [] self.lstepprops: List[List] = [] try: self.loaded = self.load(path) except BaseException as exc: # logger.error("Demo failed to import. %s", str(exc)) self.loaded = False
def retranslateUi(self, AboutForm): AboutForm.setWindowTitle(QCoreApplication.translate("AboutForm", u"Form", None)) self.label_8.setText(QCoreApplication.translate("AboutForm", u"<a href=\"https://github.com/tonquer/waifu2x-vulkan\"> waifu2x-vulkan</a>", None)) self.label.setText(QCoreApplication.translate("AboutForm", u"waifu2x-GUI-demo v1.0.1", None)) self.label_2.setText("") self.label_4.setText(QCoreApplication.translate("AboutForm", u"\u9879\u76ee\u5f00\u6e90\u5730\u5740\uff1a", None)) self.label_7.setText(QCoreApplication.translate("AboutForm", u"waifu2x\u5730\u5740", None)) self.label_6.setText(QCoreApplication.translate("AboutForm", u"1.1.1", None)) self.label_5.setText(QCoreApplication.translate("AboutForm", u"waifu2x\u7248\u672c\uff1a", None)) self.label_3.setText(QCoreApplication.translate("AboutForm", u"<a href=\"https://github.com/tonquer/waifu2x-ncnn-vulkan--GUI\"> waifu2x-ncnn-vulkan-GUI</a>", None))
def urlChanged(self, value): if ' ' in value or value == '': self.url_submit_pushButtontton.setEnabled(False) self.url_submit_pushButtontton.setToolTip( QCoreApplication.translate("ytaddlink_src_ui_tr", 'Please enter a valid video link')) else: self.url_submit_pushButtontton.setEnabled(True) self.url_submit_pushButtontton.setToolTip('')
def show_updates(self, latest_version): """Show updates.""" if version.parse(latest_version) > version.parse(__version__): msg_update = QCoreApplication.translate( "MessageBox", "PyDebloatX {0} is available.\n\nVisit download page?").format( latest_version) if self.message_box(msg_update, 2) == QMessageBox.Yes: webbrowser.open_new( 'https://github.com/Teraskull/PyDebloatX/releases')