72 'wizards_qregularexpression') |
72 'wizards_qregularexpression') |
73 self.action.setStatusTip(self.trUtf8('QRegularExpression Wizard')) |
73 self.action.setStatusTip(self.trUtf8('QRegularExpression Wizard')) |
74 self.action.setWhatsThis(self.trUtf8( |
74 self.action.setWhatsThis(self.trUtf8( |
75 """<b>QRegularExpression Wizard</b>""" |
75 """<b>QRegularExpression Wizard</b>""" |
76 """<p>This wizard opens a dialog for entering all the parameters""" |
76 """<p>This wizard opens a dialog for entering all the parameters""" |
77 """ needed to create a QRegularExpression string. The generated code""" |
77 """ needed to create a QRegularExpression string. The generated""" |
78 """ is inserted at the current cursor position.</p>""" |
78 """ code is inserted at the current cursor position.</p>""" |
79 )) |
79 )) |
80 self.action.triggered[()].connect(self.__handle) |
80 self.action.triggered[()].connect(self.__handle) |
81 |
81 |
82 self.__ui.addE5Actions([self.action], 'wizards') |
82 self.__ui.addE5Actions([self.action], 'wizards') |
83 |
83 |
94 Private method to display a dialog and get the code. |
94 Private method to display a dialog and get the code. |
95 |
95 |
96 @param editor reference to the current editor |
96 @param editor reference to the current editor |
97 @return the generated code (string) |
97 @return the generated code (string) |
98 """ |
98 """ |
99 from WizardPlugins.QRegularExpressionWizard.QRegularExpressionWizardDialog import \ |
99 from WizardPlugins.QRegularExpressionWizard\ |
|
100 .QRegularExpressionWizardDialog import \ |
100 QRegularExpressionWizardDialog |
101 QRegularExpressionWizardDialog |
101 dlg = QRegularExpressionWizardDialog(None, True) |
102 dlg = QRegularExpressionWizardDialog(None, True) |
102 if dlg.exec_() == QDialog.Accepted: |
103 if dlg.exec_() == QDialog.Accepted: |
103 line, index = editor.getCursorPosition() |
104 line, index = editor.getCursorPosition() |
104 indLevel = editor.indentation(line) // editor.indentationWidth() |
105 indLevel = editor.indentation(line) // editor.indentationWidth() |