Plugins/PluginWizardQRegularExpression.py

changeset 3004
c4bf32c791d0
parent 2962
d6c9d1ca2da4
child 3020
542e97d4ecb3
child 3057
10516539f238
equal deleted inserted replaced
3003:cb43c34239b1 3004:c4bf32c791d0
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()

eric ide

mercurial