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.FontDialogWizard.FontDialogWizardDialog import \ |
16 from WizardPlugins.FontDialogWizard.FontDialogWizardDialog import \ |
17 FontDialogWizardDialog |
17 FontDialogWizardDialog |
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('QFontDialog Wizard'), |
71 self.action = E5Action(self.trUtf8('QFontDialog Wizard'), |
72 self.trUtf8('Q&FontDialog Wizard...'), 0, 0, self, |
72 self.trUtf8('Q&FontDialog Wizard...'), 0, 0, self, |
73 'wizards_qfontdialog') |
73 'wizards_qfontdialog') |
74 self.action.setStatusTip(self.trUtf8('QFontDialog Wizard')) |
74 self.action.setStatusTip(self.trUtf8('QFontDialog Wizard')) |
75 self.action.setWhatsThis(self.trUtf8( |
75 self.action.setWhatsThis(self.trUtf8( |
76 """<b>QFontDialog Wizard</b>""" |
76 """<b>QFontDialog Wizard</b>""" |
78 """ needed to create a QFontDialog. The generated code is inserted""" |
78 """ needed to create a QFontDialog. 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 """ |