34 |
34 |
35 def exportSource(self): |
35 def exportSource(self): |
36 """ |
36 """ |
37 Public method performing the export. |
37 Public method performing the export. |
38 """ |
38 """ |
39 filename = self._getFileName(self.trUtf8("ODT Files (*.odt)")) |
39 filename = self._getFileName(self.tr("ODT Files (*.odt)")) |
40 if not filename: |
40 if not filename: |
41 return |
41 return |
42 |
42 |
43 QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) |
43 QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) |
44 QApplication.processEvents() |
44 QApplication.processEvents() |
68 ok = writer.write(doc) |
68 ok = writer.write(doc) |
69 QApplication.restoreOverrideCursor() |
69 QApplication.restoreOverrideCursor() |
70 if not ok: |
70 if not ok: |
71 E5MessageBox.critical( |
71 E5MessageBox.critical( |
72 self.editor, |
72 self.editor, |
73 self.trUtf8("Export source"), |
73 self.tr("Export source"), |
74 self.trUtf8( |
74 self.tr( |
75 """<p>The source could not be exported to""" |
75 """<p>The source could not be exported to""" |
76 """ <b>{0}</b>.</p>""").format(filename)) |
76 """ <b>{0}</b>.</p>""").format(filename)) |