def showWarning(message, title="Warning"): """ shows a warning dialog with given message """ app = guidata.qapplication() QMessageBox.warning(None, title, message)
def showWarning(message): """ shows a warning dialog with given message """ app = guidata.qapplication() QMessageBox.warning(None, "Warning", message)
def inner(ds, it, value, parent, target=target): invalidFields = ds.check() if len(invalidFields): msg = "The following fields are invalid: \n" msg += "\n".join(invalidFields) QMessageBox.warning(parent, "Error", msg) return target()
def showWarning(message): """ shows a warning dialog with given message """ guidata.qapplication().beep() QMessageBox.warning(None, "Warning", message)
def wrapped(ds, it, value, parent): # check inputs before callback is executed invalidFields = ds.check() if len(invalidFields): msg = "The following fields are invalid: \n" msg += "\n".join(invalidFields) QMessageBox.warning(parent, "Error", msg) return callback(ds)
def check(self): is_ok = True for edl in self.edit_layout: if not edl.check_all_values(): is_ok = False if not is_ok: QMessageBox.warning(self, self.instance.get_title(), _("Some required entries are incorrect")+"\n"+\ _("Please check highlighted fields.")) return False return True
def check(self): is_ok = True for edl in self.edit_layout: if not edl.check_all_values(): is_ok = False if not is_ok: QMessageBox.warning(self, self.instance.get_title(), _("Some required entries are incorrect")+".\n", _("Please check highlighted fields.")) return False return True
def on_actionOpen_log_triggered(self): logfile = os.path.join(USER_DATA_DIR, 'zupport.log') if os.path.exists(logfile): import webbrowser webbrowser.open(logfile) self.logger.debug('Opened log file %s' % logfile) else: msg = "Zupport log file cannot be found in default location %s" % os.path.dirname(logfile) self.logger.debug(msg) QMessageBox.warning(self, "File not found", msg, buttons=QMessageBox.Ok, defaultButton=QMessageBox.NoButton)
def edit(self): import guidata from guidata.qt.QtGui import QMessageBox app = guidata.qapplication() while True: aborted = self.parameters.edit(size=(600, 800)) == 0 if not aborted: ok, msg = self.check_fields() if not ok: QMessageBox.warning(None, "Error", msg) continue global global_config global_config = self break return aborted
def stop_button( self ): sel = 0 if self.sessiontype == 'timed': sel = QMessageBox.warning( self, "Timed Session", "A Timed Session is currently active!\nIf you stop the session " "the session will be stored as a free session.", "OK", "Cancel") if sel == 0: self.session_stop()
def ErrorMessage(message): QMessageBox.warning(None, 'Error', message)
def warning_popup(message, parent=None): QMessageBox.warning(parent, 'Message', message, QMessageBox.Ok)