Plugins/PluginWizardQFileDialog.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3178
f25fc1364c88
parent 3345
071afe8be2a1
child 3523
8df1ab89e261
equal deleted inserted replaced
3456:96232974dcdb 3484:645c12de6b0c
21 # Start-Of-Header 21 # Start-Of-Header
22 name = "QFileDialog Wizard Plugin" 22 name = "QFileDialog Wizard Plugin"
23 author = "Detlev Offenbach <detlev@die-offenbachs.de>" 23 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
24 autoactivate = True 24 autoactivate = True
25 deactivateable = True 25 deactivateable = True
26 version = "5.4.0" 26 version = "5.5.0"
27 className = "FileDialogWizard" 27 className = "FileDialogWizard"
28 packageName = "__core__" 28 packageName = "__core__"
29 shortDescription = "Show the QFileDialog wizard." 29 shortDescription = "Show the QFileDialog wizard."
30 longDescription = """This plugin shows the QFileDialog wizard.""" 30 longDescription = """This plugin shows the QFileDialog wizard."""
31 pyqtApi = 2 31 pyqtApi = 2
72 def __initAction(self): 72 def __initAction(self):
73 """ 73 """
74 Private method to initialize the action. 74 Private method to initialize the action.
75 """ 75 """
76 self.action = E5Action( 76 self.action = E5Action(
77 self.trUtf8('QFileDialog Wizard'), 77 self.tr('QFileDialog Wizard'),
78 self.trUtf8('Q&FileDialog Wizard...'), 0, 0, self, 78 self.tr('Q&FileDialog Wizard...'), 0, 0, self,
79 'wizards_qfiledialog') 79 'wizards_qfiledialog')
80 self.action.setStatusTip(self.trUtf8('QFileDialog Wizard')) 80 self.action.setStatusTip(self.tr('QFileDialog Wizard'))
81 self.action.setWhatsThis(self.trUtf8( 81 self.action.setWhatsThis(self.tr(
82 """<b>QFileDialog Wizard</b>""" 82 """<b>QFileDialog Wizard</b>"""
83 """<p>This wizard opens a dialog for entering all the parameters""" 83 """<p>This wizard opens a dialog for entering all the parameters"""
84 """ needed to create a QFileDialog. The generated code is""" 84 """ needed to create a QFileDialog. The generated code is"""
85 """ inserted at the current cursor position.</p>""" 85 """ inserted at the current cursor position.</p>"""
86 )) 86 ))
87 self.action.triggered[()].connect(self.__handle) 87 self.action.triggered.connect(self.__handle)
88 88
89 self.__ui.addE5Actions([self.action], 'wizards') 89 self.__ui.addE5Actions([self.action], 'wizards')
90 90
91 def __initMenu(self): 91 def __initMenu(self):
92 """ 92 """
130 editor = e5App().getObject("ViewManager").activeWindow() 130 editor = e5App().getObject("ViewManager").activeWindow()
131 131
132 if editor is None: 132 if editor is None:
133 E5MessageBox.critical( 133 E5MessageBox.critical(
134 self.__ui, 134 self.__ui,
135 self.trUtf8('No current editor'), 135 self.tr('No current editor'),
136 self.trUtf8('Please open or create a file first.')) 136 self.tr('Please open or create a file first.'))
137 else: 137 else:
138 code, ok = self.__callForm(editor) 138 code, ok = self.__callForm(editor)
139 if ok: 139 if ok:
140 line, index = editor.getCursorPosition() 140 line, index = editor.getCursorPosition()
141 # It should be done on this way to allow undo 141 # It should be done on this way to allow undo

eric ide

mercurial