17 Commits

Author SHA1 Message Date
Denis Rouzaud
2562958772 sipify 2024-12-07 05:16:00 +10:00
Mathieu Pellerin
52816584cc Address review 2024-08-17 11:37:35 +07:00
Mathieu Pellerin
26308050c4 [processing] Fix script editor dialog wrongly jumping back to line 1 and setting changed to true after saving file 2024-08-16 14:53:53 +07:00
Nyall Dawson
3a578d6712 Header update 2024-08-13 20:28:55 +10:00
Nyall Dawson
8dcb158394 Move "share on gist" logic to QgsCodeEditorWidget
Allows this functionality to be used by other code editors, not
just console script editor
2024-06-24 18:40:00 +10:00
Nyall Dawson
9946a1d739 Move console script editor external file watching logic to QgsCodeEditorWidget
Ensures a consistent behavior between console script editor and
eg processing script editor
2024-06-18 05:23:57 +10:00
Nyall Dawson
d345c68c5a Move responsibility for loading scripts to QgsCodeEditorWidget 2024-06-18 05:23:57 +10:00
Nyall Dawson
0931624dea Add (non-exposed) setting for the external Python editor
This isn't exposed in the GUI, but allows users to
set a specific editor command to use when opening
Python files in the external editor.

Use the token <file> to insert the filename, <line>
to insert line number, and <col> to insert the column number.

Eg:

  QgsSettings().setValue(
    'gui/code-editor/python/external-editor',
    'kate -l <line> -c <col> "<file>"')
2024-06-15 09:01:33 +10:00
Nyall Dawson
6a018f65f5 Move responsibility for opening files in external editor to QgsCodeEditorWidget
This allows the editor to be opened in a proper detached process,
avoiding the editor being closed when QGIS is exited.

Move to a blocklist for terminal text editors instead of the fragile
polling approach (which eg doesn't work if the editor is set to
pycharm)
2024-06-07 20:46:45 +10:00
Nyall Dawson
e42dc886aa Move file path handling for console editor to QgsCodeEditorWidget 2024-06-07 20:46:45 +10:00
Nyall Dawson
1c23950304 Replace bar is not always visible when find is
Instead do the vscode/pycharm thing and only show it when a replace
toggle is clicked, or Ctrl + R is pressed
2024-05-16 08:44:14 +10:00
Nyall Dawson
1ea04ae712 Add warning methods to QgsCodeEditorWidget
These call the underlying QgsCodeEditor methods to show inline
warnings, but also add corresponding highlights on the scroll bar
2024-05-15 17:12:20 +10:00
Nyall Dawson
e435e3f931 Expose scrollbar controller to PyQGIS
Allows plugins etc to add custom highlights to the scrollbar
2024-05-15 17:12:20 +10:00
Nyall Dawson
280b92cd44 Indentation 2024-05-10 13:56:49 +10:00
Nyall Dawson
58dafb48f8 Move message bar logic to QgsCodeEditorWidget 2024-05-10 13:56:49 +10:00
Nyall Dawson
64e0fff67f [console] Rely on QgsCodeEditorWidget search functionality
Remove duplicate code searching functionality from console script
editor and just use the standard QgsCodeEditorWidget implementation
2024-05-10 13:56:49 +10:00
Nyall Dawson
1e8c00354f Move QgsCodeEditorWidget to a new file 2024-05-08 11:56:35 +10:00