Esempio n. 1
0
def showWarning(message, title="Warning"):
    """
    shows a warning dialog with given message
    """

    app = guidata.qapplication()
    QMessageBox.warning(None, title, message)
Esempio n. 2
0
def showWarning(message):
    """
    shows a warning dialog with given message
    """

    app = guidata.qapplication()
    QMessageBox.warning(None, "Warning", message)
Esempio n. 3
0
 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()
Esempio n. 4
0
def showWarning(message):
    """
    shows a warning dialog with given message
    """


    guidata.qapplication().beep()
    QMessageBox.warning(None, "Warning", message)
Esempio n. 5
0
 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()
Esempio n. 6
0
 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)
Esempio n. 7
0
 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)
Esempio n. 8
0
 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
Esempio n. 9
0
 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
Esempio n. 10
0
 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)
Esempio n. 11
0
File: gui.py Progetto: cbig/zupport
 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)
Esempio n. 12
0
 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
Esempio n. 13
0
 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
Esempio n. 14
0
 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()
Esempio n. 15
0
def ErrorMessage(message):
    QMessageBox.warning(None, 'Error', message)
Esempio n. 16
0
def warning_popup(message, parent=None):
    QMessageBox.warning(parent, 'Message', message, QMessageBox.Ok)
Esempio n. 17
0
def warning_popup(message, parent=None):
    QMessageBox.warning(parent, 'Message', message, QMessageBox.Ok)
Esempio n. 18
0
def ErrorMessage(message):
    QMessageBox.warning(None, 'Error', message)