QScintilla/Exporters/ExporterBase.py

changeset 945
8cd4d08fa9f6
parent 882
34b86be88bf0
child 1112
8a7d1b9d18db
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
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

eric ide

mercurial