12 |
12 |
13 from E5Gui import E5MessageBox, E5FileDialog |
13 from E5Gui import E5MessageBox, E5FileDialog |
14 |
14 |
15 import Utilities |
15 import Utilities |
16 |
16 |
|
17 |
17 class ExporterBase(QObject): |
18 class ExporterBase(QObject): |
18 """ |
19 """ |
19 Class implementing the exporter base class. |
20 Class implementing the exporter base class. |
20 """ |
21 """ |
21 def __init__(self, editor, parent = None): |
22 def __init__(self, editor, parent=None): |
22 """ |
23 """ |
23 Constructor |
24 Constructor |
24 |
25 |
25 @param editor reference to the editor object (QScintilla.Editor.Editor) |
26 @param editor reference to the editor object (QScintilla.Editor.Editor) |
26 @param parent parent object of the exporter (QObject) |
27 @param parent parent object of the exporter (QObject) |
55 if QFileInfo(fn).exists(): |
56 if QFileInfo(fn).exists(): |
56 res = E5MessageBox.yesNo(self.editor, |
57 res = E5MessageBox.yesNo(self.editor, |
57 self.trUtf8("Export source"), |
58 self.trUtf8("Export source"), |
58 self.trUtf8("<p>The file <b>{0}</b> already exists." |
59 self.trUtf8("<p>The file <b>{0}</b> already exists." |
59 " Overwrite it?</p>").format(fn), |
60 " Overwrite it?</p>").format(fn), |
60 icon = E5MessageBox.Warning) |
61 icon=E5MessageBox.Warning) |
61 if not res: |
62 if not res: |
62 return "" |
63 return "" |
63 |
64 |
64 fn = Utilities.toNativeSeparators(fn) |
65 fn = Utilities.toNativeSeparators(fn) |
65 |
66 |