98 Private method to display a dialog and get the code. |
98 Private method to display a dialog and get the code. |
99 |
99 |
100 @param editor reference to the current editor |
100 @param editor reference to the current editor |
101 @return the generated code (string) |
101 @return the generated code (string) |
102 """ |
102 """ |
103 from WizardPlugins.QRegularExpressionWizard\ |
103 from WizardPlugins.QRegularExpressionWizard import ( |
104 .QRegularExpressionWizardDialog import \ |
|
105 QRegularExpressionWizardDialog |
104 QRegularExpressionWizardDialog |
106 dlg = QRegularExpressionWizardDialog(None, True) |
105 ) |
|
106 dlg = QRegularExpressionWizardDialog.QRegularExpressionWizardDialog( |
|
107 None, True) |
107 if dlg.exec_() == QDialog.Accepted: |
108 if dlg.exec_() == QDialog.Accepted: |
108 line, index = editor.getCursorPosition() |
109 line, index = editor.getCursorPosition() |
109 indLevel = editor.indentation(line) // editor.indentationWidth() |
110 indLevel = editor.indentation(line) // editor.indentationWidth() |
110 if editor.indentationsUseTabs(): |
111 if editor.indentationsUseTabs(): |
111 indString = '\t' |
112 indString = '\t' |