105 Private method to display a dialog and get the code. |
105 Private method to display a dialog and get the code. |
106 |
106 |
107 @param editor reference to the current editor |
107 @param editor reference to the current editor |
108 @return the generated code (string) |
108 @return the generated code (string) |
109 """ |
109 """ |
110 from eric7.Plugins.WizardPlugins.InputDialogWizard.InputDialogWizardDialog import ( # __IGNORE_WARNING__ |
110 from eric7.Plugins.WizardPlugins.InputDialogWizard import ( |
111 InputDialogWizardDialog, |
111 InputDialogWizardDialog, |
112 ) |
112 ) |
113 |
113 |
114 dlg = InputDialogWizardDialog(None) |
114 dlg = InputDialogWizardDialog.InputDialogWizardDialog(None) |
115 if dlg.exec() == QDialog.DialogCode.Accepted: |
115 if dlg.exec() == QDialog.DialogCode.Accepted: |
116 line, index = editor.getCursorPosition() |
116 line, index = editor.getCursorPosition() |
117 indLevel = editor.indentation(line) // editor.indentationWidth() |
117 indLevel = editor.indentation(line) // editor.indentationWidth() |
118 if editor.indentationsUseTabs(): |
118 if editor.indentationsUseTabs(): |
119 indString = "\t" |
119 indString = "\t" |