Пример #1
0
    def block_use_space(self, start, finish):
        Dialog = QtGui.QDialog(self)
        dl = blockslot.blockDialog(Dialog, self.om_gui)

        dl.setTimes(start, finish)
        dl.setPatient(self.om_gui.pt)

        if dl.exec_():
            adjstart = dl.start_timeEdit.time()
            adjfinish = dl.finish_timeEdit.time()
            if finish < start:
                QtGui.QMessageBox.information(self, _("Whoops!"),
                                              _("Bad Time Sequence!"))

            if dl.block:
                reason = str(
                    dl.comboBox.currentText().toAscii())[:30]

                self.pWidget.emit(QtCore.SIGNAL("BlockEmptySlot"),
                                 (start, finish, adjstart, adjfinish,
                                  localsettings.apptix.get(
                                  self.pWidget.dentist),
                                  reason))
            else:
                reason = dl.reason_comboBox.currentText().toAscii()
                self.pWidget.emit(
                    QtCore.SIGNAL("Appointment_into_EmptySlot"),
                    (start, finish, adjstart, adjfinish,
                     localsettings.apptix.get(self.pWidget.dentist),
                     reason, dl.patient))
Пример #2
0
    def block_use_space(self, start, finish):
        Dialog = QtGui.QDialog(self)
        dl = blockslot.blockDialog(Dialog, self.pWidget)

        dl.setTimes(start, finish)
        dl.setPatient(self.pWidget.diary_widget.pt)

        if dl.exec_():
            adjstart = dl.start_timeEdit.time()
            adjfinish = dl.finish_timeEdit.time()
            if finish < start:
                QtGui.QMessageBox.information(self, _("Whoops!"),
                                              _("Bad Time Sequence!"))

            if dl.block:
                reason = str(
                    dl.comboBox.currentText().toAscii())[:30]
                args = (start, finish, adjstart, adjfinish,
                        localsettings.apptix.get(self.pWidget.dentist), reason)
                self.pWidget.block_empty_slot_signal.emit(args)
            else:
                reason = dl.reason_comboBox.currentText().toAscii()
                self.pWidget.appt_empty_slot_signal.emit(
                    (start, finish, adjstart, adjfinish,
                     localsettings.apptix.get(self.pWidget.dentist),
                     reason, dl.patient))
Пример #3
0
    def block_use_space(self, start, finish):
        Dialog = QtGui.QDialog(self)
        dl = blockslot.blockDialog(Dialog, self.pWidget)

        dl.setTimes(start, finish)
        dl.setPatient(self.pWidget.diary_widget.pt)

        if dl.exec_():
            adjstart = dl.start_timeEdit.time()
            adjfinish = dl.finish_timeEdit.time()
            if finish < start:
                QtGui.QMessageBox.information(self, _("Whoops!"), _("Bad Time Sequence!"))

            if dl.block:
                reason = str(dl.comboBox.currentText().toAscii())[:30]
                args = (start, finish, adjstart, adjfinish, localsettings.apptix.get(self.pWidget.dentist), reason)
                self.pWidget.block_empty_slot_signal.emit(args)
            else:
                reason = dl.reason_comboBox.currentText().toAscii()
                self.pWidget.appt_empty_slot_signal.emit(
                    (
                        start,
                        finish,
                        adjstart,
                        adjfinish,
                        localsettings.apptix.get(self.pWidget.dentist),
                        reason,
                        dl.patient,
                    )
                )
Пример #4
0
    def block_use_space(self, start, finish):
        Dialog = QtGui.QDialog(self)
        dl = blockslot.blockDialog(Dialog, self.om_gui)

        dl.setTimes(start, finish)
        dl.setPatient(self.om_gui.pt)

        if dl.exec_():
            adjstart = dl.start_timeEdit.time()
            adjfinish = dl.finish_timeEdit.time()
            if finish < start:
                QtGui.QMessageBox.information(self, _("Whoops!"),
                                              _("Bad Time Sequence!"))

            if dl.block:
                reason = str(dl.comboBox.currentText().toAscii())[:30]

                self.pWidget.emit(
                    QtCore.SIGNAL("BlockEmptySlot"),
                    (start, finish, adjstart, adjfinish,
                     localsettings.apptix.get(self.pWidget.dentist), reason))
            else:
                reason = dl.reason_comboBox.currentText().toAscii()
                self.pWidget.emit(
                    QtCore.SIGNAL("Appointment_into_EmptySlot"),
                    (start, finish, adjstart, adjfinish,
                     localsettings.apptix.get(
                         self.pWidget.dentist), reason, dl.patient))