def __init__(self, patient, chartimage, parent): BaseDialog.__init__(self, parent) self.pt = patient self.chartimage = chartimage patient_label = QtWidgets.QLabel( "%s<br /><b>%s</b>" % (_("Print the record of"), patient.name_id)) patient_label.setAlignment(QtCore.Qt.AlignCenter) self.web_view = OMWebView(self) self.web_view.loadStarted.connect(self.print_start) self.web_view.loadFinished.connect(self.print_load_result) self.insertWidget(patient_label) self.insertWidget(self.web_view) self.apply_but.setText("Print") self.enableApply() html = patientDetails.header(self.pt).replace("center", "left") html += '''<hr /> <div align="center"> <img src="%s" width="80%%" /> </div> <hr />''' % self.chartimage html += formatted_notes.notes(self.pt.notes_dict) self.web_view.setHtml(html)
def __init__(self, patient, chartimage, parent): BaseDialog.__init__(self, parent) self.pt = patient self.main_ui = parent patient_label = QtGui.QLabel("%s<br /><b>%s</b>" % ( _("Print the record of"), patient.name_id)) patient_label.setAlignment(QtCore.Qt.AlignCenter) self.web_view = QtWebKit.QWebView() self.insertWidget(patient_label) self.insertWidget(self.web_view) html = patientDetails.header(patient).replace("center", "left") html += '<img src="%s" height = "120px" /><hr />' % ( chartimage) html += formatted_notes.notes(patient.notes_dict) self.web_view.setHtml(html) self.apply_but.setText("Print") self.enableApply()