Plugins/PluginWizardQFileDialog.py

changeset 55
b5c84934de9c
parent 53
c3eb7cc1ff8b
child 117
d63640116aec
equal deleted inserted replaced
54:31463df17fd5 55:b5c84934de9c
8 """ 8 """
9 9
10 from PyQt4.QtCore import QObject, SIGNAL 10 from PyQt4.QtCore import QObject, SIGNAL
11 from PyQt4.QtGui import QDialog, QMessageBox 11 from PyQt4.QtGui import QDialog, QMessageBox
12 12
13 from E4Gui.E4Application import e5App 13 from E5Gui.E5Application import e5App
14 from E4Gui.E4Action import E4Action 14 from E5Gui.E5Action import E5Action
15 15
16 from WizardPlugins.FileDialogWizard.FileDialogWizardDialog import \ 16 from WizardPlugins.FileDialogWizard.FileDialogWizardDialog import \
17 FileDialogWizardDialog 17 FileDialogWizardDialog
18 18
19 # Start-Of-Header 19 # Start-Of-Header
60 Public method to deactivate this plugin. 60 Public method to deactivate this plugin.
61 """ 61 """
62 menu = self.__ui.getMenu("wizards") 62 menu = self.__ui.getMenu("wizards")
63 if menu: 63 if menu:
64 menu.removeAction(self.action) 64 menu.removeAction(self.action)
65 self.__ui.removeE4Actions([self.action], 'wizards') 65 self.__ui.removeE5Actions([self.action], 'wizards')
66 66
67 def __initAction(self): 67 def __initAction(self):
68 """ 68 """
69 Private method to initialize the action. 69 Private method to initialize the action.
70 """ 70 """
71 self.action = E4Action(self.trUtf8('QFileDialog Wizard'), 71 self.action = E5Action(self.trUtf8('QFileDialog Wizard'),
72 self.trUtf8('Q&FileDialog Wizard...'), 0, 0, self, 72 self.trUtf8('Q&FileDialog Wizard...'), 0, 0, self,
73 'wizards_qfiledialog') 73 'wizards_qfiledialog')
74 self.action.setStatusTip(self.trUtf8('QFileDialog Wizard')) 74 self.action.setStatusTip(self.trUtf8('QFileDialog Wizard'))
75 self.action.setWhatsThis(self.trUtf8( 75 self.action.setWhatsThis(self.trUtf8(
76 """<b>QFileDialog Wizard</b>""" 76 """<b>QFileDialog Wizard</b>"""
78 """ needed to create a QFileDialog. The generated code is inserted""" 78 """ needed to create a QFileDialog. The generated code is inserted"""
79 """ at the current cursor position.</p>""" 79 """ at the current cursor position.</p>"""
80 )) 80 ))
81 self.connect(self.action, SIGNAL('triggered()'), self.__handle) 81 self.connect(self.action, SIGNAL('triggered()'), self.__handle)
82 82
83 self.__ui.addE4Actions([self.action], 'wizards') 83 self.__ui.addE5Actions([self.action], 'wizards')
84 84
85 def __initMenu(self): 85 def __initMenu(self):
86 """ 86 """
87 Private method to add the actions to the right menu. 87 Private method to add the actions to the right menu.
88 """ 88 """

eric ide

mercurial