def test_exec(self):
     self.exec_(standard_letter._test())
Пример #2
0
            r"<!-- letter body -->(.*)<!-- end of letter body -->", re.DOTALL)
        new_text = re.sub(compiled, new_body, self.orig_html)

        compiled = re.compile(
            r"<!-- footer -->(.*)<!-- end of footer -->", re.DOTALL)
        new_text = re.sub(compiled, new_footer, new_text)

        new_text = self.replace_placeholders(new_text)

        self.text_edit.setHtml(new_text)
        self.orig_qhtml = self.text

    @property
    def has_edits(self):
        return self.text != self.orig_qhtml

    @property
    def text(self):
        return str(self.text_edit.toHtml())

    @property
    def letter_description(self):
        return str(self.combo_box.currentText())


if __name__ == "__main__":
    app = QtGui.QApplication([])
    LOGGER.setLevel(logging.DEBUG)
    dl = CorrespondenceDialog(standard_letter._test())
    dl.exec_()