66 def __initAction(self): |
66 def __initAction(self): |
67 """ |
67 """ |
68 Private method to initialize the action. |
68 Private method to initialize the action. |
69 """ |
69 """ |
70 self.action = E5Action( |
70 self.action = E5Action( |
71 self.trUtf8('QColorDialog Wizard'), |
71 self.tr('QColorDialog Wizard'), |
72 self.trUtf8('Q&ColorDialog Wizard...'), 0, 0, self, |
72 self.tr('Q&ColorDialog Wizard...'), 0, 0, self, |
73 'wizards_qcolordialog') |
73 'wizards_qcolordialog') |
74 self.action.setStatusTip(self.trUtf8('QColorDialog Wizard')) |
74 self.action.setStatusTip(self.tr('QColorDialog Wizard')) |
75 self.action.setWhatsThis(self.trUtf8( |
75 self.action.setWhatsThis(self.tr( |
76 """<b>QColorDialog Wizard</b>""" |
76 """<b>QColorDialog Wizard</b>""" |
77 """<p>This wizard opens a dialog for entering all the parameters""" |
77 """<p>This wizard opens a dialog for entering all the parameters""" |
78 """ needed to create a QColorDialog. The generated code is""" |
78 """ needed to create a QColorDialog. The generated code is""" |
79 """ inserted at the current cursor position.</p>""" |
79 """ inserted at the current cursor position.</p>""" |
80 )) |
80 )) |
118 editor = e5App().getObject("ViewManager").activeWindow() |
118 editor = e5App().getObject("ViewManager").activeWindow() |
119 |
119 |
120 if editor is None: |
120 if editor is None: |
121 E5MessageBox.critical( |
121 E5MessageBox.critical( |
122 self.__ui, |
122 self.__ui, |
123 self.trUtf8('No current editor'), |
123 self.tr('No current editor'), |
124 self.trUtf8('Please open or create a file first.')) |
124 self.tr('Please open or create a file first.')) |
125 else: |
125 else: |
126 code, ok = self.__callForm(editor) |
126 code, ok = self.__callForm(editor) |
127 if ok: |
127 if ok: |
128 line, index = editor.getCursorPosition() |
128 line, index = editor.getCursorPosition() |
129 # It should be done on this way to allow undo |
129 # It should be done on this way to allow undo |