317 Public method to generate image text. |
317 Public method to generate image text. |
318 |
318 |
319 @param editor reference to the editor to work on |
319 @param editor reference to the editor to work on |
320 @type Editor |
320 @type Editor |
321 """ |
321 """ |
322 from .ImageMarkupDialog import ImageMarkupDialog |
322 from .ImageMarkupDialog import ImageMarkupDialog, ImageMarkupMode |
323 |
323 |
324 if editor is None: |
324 if editor is None: |
325 return |
325 return |
326 |
326 |
327 dlg = ImageMarkupDialog(ImageMarkupDialog.RestMode) |
327 dlg = ImageMarkupDialog(ImageMarkupMode.Rest) |
328 if dlg.exec() == QDialog.DialogCode.Accepted: |
328 if dlg.exec() == QDialog.DialogCode.Accepted: |
329 address, altText, title, originalSize, width, height = dlg.getData() |
329 address, altText, title, originalSize, width, height = dlg.getData() |
330 |
330 |
331 lineSeparator = editor.getLineSeparator() |
331 lineSeparator = editor.getLineSeparator() |
332 markup = ".. image:: {0}{1}".format(address, lineSeparator) |
332 markup = ".. image:: {0}{1}".format(address, lineSeparator) |