def accept(self):
     if not self.get_new_mh():
         return
     if not self.has_edits and self.mh.chkdate != self.new_mh.chkdate:
         if (
             QtWidgets.QMessageBox.question(
                 self,
                 _("question"),
                 _("No changes - mark as checked today?"),
                 QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No,
                 QtWidgets.QMessageBox.No,
             )
             == QtWidgets.QMessageBox.Yes
         ):
             self.checked_only = True
         else:
             BaseDialog.reject(self)
             return
     elif self.is_new_mh and not self.has_edits:
         if (
             QtWidgets.QMessageBox.question(
                 self,
                 _("question"),
                 _("Blank Medical History Entered - mark as checked today?"),
                 QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No,
                 QtWidgets.QMessageBox.No,
             )
             == QtWidgets.QMessageBox.No
         ):
             BaseDialog.reject(self)
             return
     BaseDialog.accept(self)
Пример #2
0
 def reject(self):
     self.get_new_mh(rejecting=True)
     if self.has_edits:
         if QtWidgets.QMessageBox.question(
                 self, _("Confirm"), _("Abandon your changes?"),
                 QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No,
                 QtWidgets.QMessageBox.No) == QtWidgets.QMessageBox.No:
             return
     BaseDialog.reject(self)
Пример #3
0
 def reject(self):
     self.get_new_mh(rejecting=True)
     if self.has_edits:
         if QtGui.QMessageBox.question(
             self,
               _("Confirm"),
               _("Abandon your changes?"),
               QtGui.QMessageBox.Yes | QtGui.QMessageBox.No,
               QtGui.QMessageBox.No) == QtGui.QMessageBox.No:
             return
     BaseDialog.reject(self)
 def reject(self):
     LOGGER.info("Forced quit - no database connection")
     try:
         connect.params.signaller.connection_signal.disconnect(
             self.is_connected)
     except TypeError:
         pass
     app = QtWidgets.QApplication.instance()
     connect.params.connection_abandoned = True
     QtCore.QTimer.singleShot(4000, app.closeAllWindows)
     QtWidgets.QMessageBox.warning(
         self, _("Closing"),
         _("No Database Connection - Closing OpenMolar"))
     BaseDialog.reject(self)
     app.closeAllWindows()
 def reject(self):
     LOGGER.info("Forced quit - no database connection")
     try:
         connect.params.signaller.connection_signal.disconnect(
             self.is_connected)
     except TypeError:
         pass
     app = QtWidgets.QApplication.instance()
     connect.params.connection_abandoned = True
     QtCore.QTimer.singleShot(4000, app.closeAllWindows)
     QtWidgets.QMessageBox.warning(
         self, _("Closing"),
         _("No Database Connection - Closing OpenMolar"))
     BaseDialog.reject(self)
     app.closeAllWindows()
Пример #6
0
 def accept(self):
     if not self.get_new_mh():
         return
     if not self.has_edits and self.mh.chkdate != self.new_mh.chkdate:
         if QtWidgets.QMessageBox.question(
                 self, _("question"),
                 _("No changes - mark as checked today?"),
                 QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No,
                 QtWidgets.QMessageBox.No) == QtWidgets.QMessageBox.Yes:
             self.checked_only = True
         else:
             BaseDialog.reject(self)
             return
     elif self.is_new_mh and not self.has_edits:
         if QtWidgets.QMessageBox.question(
                 self, _("question"),
                 _("Blank Medical History Entered - mark as checked today?"
                   ), QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No,
                 QtWidgets.QMessageBox.No) == QtWidgets.QMessageBox.No:
             BaseDialog.reject(self)
             return
     BaseDialog.accept(self)
Пример #7
0
 def reject(self):
     if self.dbu is not None:
         self.dbu.force_stop()
     BaseDialog.reject(self)
     sys.exit("user rejected")
Пример #8
0
 def reject(self):
     self.result = self.CANCEL
     BaseDialog.reject(self)
 def reject(self):
     self.dirty = self.has_changes
     BaseDialog.reject(self)
 def reject(self):
     self.dirty = self.has_changes
     BaseDialog.reject(self)
Пример #11
0
 def reject(self):
     if self.dbu is not None:
         self.dbu.force_stop()
     BaseDialog.reject(self)
     sys.exit("user rejected")