def post_captcha(self, res_list: list): self.ui.statusbar.clearMessage() res = res_list[0] if res and res.get('address'): address_for_deposit = res['address'] self.launch_btc_deposit_window(address_for_deposit) else: show_message(ERROR_POPUP_TITLE, ERROR_MSG, 'error')
def confirm_join(self, res_list: list): self.ui.statusbar.clearMessage() res = res_list[0] if res is not None and res.get('table'): if res.get( 'table') == self.table_id: # self.table_id from join_table self.launch_poker_table( spectator=False) # self.bb = bb from join_table else: show_message(ERROR_POPUP_TITLE, ERROR_MSG, 'error') elif res is None: show_message(ERROR_POPUP_TITLE, ERROR_MSG, 'error')
def validate(self): amt = self.ui.lineEdit_btc_amt.text() if amt.isdigit(): amt = int(amt) if self.min_amt <= amt <= self.max_amt: self.close_override = True self.value.emit(amt) self.close() else: show_message( "Invalid input", f"Enter value between {self.min_amt} and {self.max_amt}", 'info') else: show_message( "Invalid input", f"Enter value between {self.min_amt} and {self.max_amt}", 'info')
def closeEvent(self, ev: 'QEvent') -> None: if self.close_override: usr_res = True else: usr_res = show_message( "Close Confirmation", "Are you sure you want to close this window?", 'close_confirm') if usr_res: self.close() else: ev.ignore()
def closeEvent(self, event: 'QEvent') -> None: if event.spontaneous(): res = show_message("Close Confirmation", "Are you sure you want to quit torpoker?", 'close_confirm') if res: self.close_all_thread() self.close() else: event.ignore() else: self.close_all_thread() self.close()