Esempio n. 1
0
    def __init__(self, Dialog, om_gui=None):
        self.Dialog = Dialog
        self.om_gui = om_gui
        self.setupUi(Dialog)
        vlayout = QtGui.QVBoxLayout(self.blockStart_frame)
        vlayout.setMargin(0)
        self.start_timeEdit = fiveminutetimeedit.FiveMinuteTimeEdit()
        vlayout.addWidget(self.start_timeEdit)

        vlayout = QtGui.QVBoxLayout(self.blockEnd_frame)
        vlayout.setMargin(0)
        self.finish_timeEdit = fiveminutetimeedit.FiveMinuteTimeEdit()
        vlayout.addWidget(self.finish_timeEdit)

        vlayout = QtGui.QVBoxLayout(self.startTime_frame)
        vlayout.setMargin(0)
        self.appointment_timeEdit = fiveminutetimeedit.FiveMinuteTimeEdit()
        vlayout.addWidget(self.appointment_timeEdit)

        self.reason_comboBox.addItems(localsettings.apptTypes)
        self.pt_label.setText(_("No patient chosen!"))
        self.patient = None
        self.block = True
        self.tabWidget.setCurrentIndex(0)

        QtCore.QObject.connect(self.changePt_pushButton,
                               QtCore.SIGNAL("clicked()"), self.changePt)

        QtCore.QObject.connect(self.start_timeEdit,
                               QtCore.SIGNAL("verifiedTime"),
                               self.changedTimes)

        QtCore.QObject.connect(self.finish_timeEdit,
                               QtCore.SIGNAL("verifiedTime"),
                               self.changedTimes)

        QtCore.QObject.connect(self.appointment_timeEdit,
                               QtCore.SIGNAL("verifiedTime"),
                               self.changedStart)

        QtCore.QObject.connect(self.length_spinBox,
                               QtCore.SIGNAL("valueChanged (int)"),
                               self.changedLength)

        self.earliestStart = None
        self.latestFinish = None
        self.minimumLength = 0
        self.length = 0
Esempio n. 2
0
    def addTimeEdits(self):
        self.start_timeEdit = \
            fiveminutetimeedit.FiveMinuteTimeEdit(self.widget)

        l = QtWidgets.QVBoxLayout(self.widget)
        l.addWidget(self.start_timeEdit)

        self.finish_timeEdit = \
            fiveminutetimeedit.FiveMinuteTimeEdit(self.widget_2)

        l = QtWidgets.QVBoxLayout(self.widget_2)
        l.addWidget(self.finish_timeEdit)

        self.start_timeEdit.setMinimumTime(localsettings.earliestStart)

        self.finish_timeEdit.setMaximumTime(localsettings.latestFinish)
Esempio n. 3
0
 def addTimeEdit(self):
     '''
     adds a custom widget which enforces a five minute time
     '''
     vlayout = QtGui.QVBoxLayout(self.time_frame)
     vlayout.setMargin(0)
     self.start_timeEdit = fiveminutetimeedit.FiveMinuteTimeEdit()
     vlayout.addWidget(self.start_timeEdit)
     self.start_timeEdit.setTime(QtCore.QTime(12, 0, 0))
Esempio n. 4
0
    def __init__(self, parent=None):
        QtWidgets.QDialog.__init__(self, parent)
        self.setupUi(self)
        self.om_gui = parent
        vlayout = QtWidgets.QVBoxLayout(self.blockStart_frame)
        vlayout.setContentsMargins(0, 0, 0, 0)
        self.start_timeEdit = fiveminutetimeedit.FiveMinuteTimeEdit()
        vlayout.addWidget(self.start_timeEdit)

        vlayout = QtWidgets.QVBoxLayout(self.blockEnd_frame)
        vlayout.setContentsMargins(0, 0, 0, 0)
        self.finish_timeEdit = fiveminutetimeedit.FiveMinuteTimeEdit()
        vlayout.addWidget(self.finish_timeEdit)

        vlayout = QtWidgets.QVBoxLayout(self.startTime_frame)
        vlayout.setContentsMargins(0, 0, 0, 0)
        self.appointment_timeEdit = fiveminutetimeedit.FiveMinuteTimeEdit()
        vlayout.addWidget(self.appointment_timeEdit)

        self.reason_comboBox.addItems(localsettings.apptTypes)
        self.pt_label.setText(_("No patient chosen!"))
        self.patient = None
        self.block = True
        self.tabWidget.setCurrentIndex(0)

        self.changePt_pushButton.clicked.connect(self.changePt)
        self.start_timeEdit.time_changed_signal.connect(self.changedTimes)
        self.finish_timeEdit.time_changed_signal.connect(self.changedTimes)
        self.appointment_timeEdit.time_changed_signal.connect(
            self.changedStart)
        self.length_spinBox.valueChanged.connect(self.changedLength)

        self.earliestStart = None
        self.latestFinish = None
        self.minimumLength = 0
        self.length = 0