34 Commits

Author SHA1 Message Date
Even Rouault
02caeb9db7
Header files: remove all mentions of '\since QGIS 2.' 2024-02-18 20:46:01 +01:00
Nyall Dawson
078fd4f2ea Make IntFlag enum type opt-in, rather than opt-out
And make sipify handle this nicely. This means that all our non-flag
style enums correctly map across to IntFlag python enums on Qt 6,
fixing issues with negative enum values for these and providing
a better match for the original c++ enum.
2024-01-31 17:16:18 +10:00
Yoann Quenach de Quivillic
f163937f3c Add methods to set and get cursor position 2023-10-28 05:07:36 +10:00
Nyall Dawson
8f5476e6d7 Avoid loss of text in code editors when certain modifiers are pressed
These are triggered when a InputMethod event is sent to the widget.
There's upstream discussion at https://sourceforge.net/p/scintilla/bugs/1913/
and the fix was added to QScintilla version 2.13.3

As the loss of text is an extreme risk, just disable input method
handling in these widgets on affected versions entirely.

Fixes #52459
2023-04-04 14:12:26 +10:00
Nyall Dawson
50c76929e1
Followup 30700f1, ensure links to Qgis members are set in docstrings 2023-03-31 10:46:24 +10:00
Nyall Dawson
03e1d90b39 Immediately write out the console history file BEFORE running commands
This prevents loss of history when a user enters a Python command
which results in a QGIS crash
2023-03-28 15:04:39 +10:00
Nyall Dawson
b9b06b057a Don't add 'exec(Path(...))' entries to console history when running scripts
These just clutter the history
2023-03-28 15:04:39 +10:00
Nyall Dawson
a6b4742e97 Use settings registry for new settings 2023-03-20 16:06:24 +10:00
Nyall Dawson
8e526353f9 Move toggle comment handling to base QgsCodeEditor class 2023-03-20 16:06:24 +10:00
Nyall Dawson
3312bf1ad2 Move syntax checking capability to QgsCodeEditorPython 2023-03-20 16:06:24 +10:00
Nyall Dawson
ac5f8da74e Support reformatting in base QgsCodeEditorPython class 2023-03-20 16:06:24 +10:00
Nyall Dawson
7b61080557 Port generic portions of reformat code action to base class 2023-03-20 16:06:24 +10:00
Nyall Dawson
6e1f4d7003 Dox 2022-10-24 16:46:11 +10:00
Nyall Dawson
becbf979d2 Dox 2022-10-24 16:46:11 +10:00
Nyall Dawson
955c72388d Factor out interpreter 2022-10-24 16:46:11 +10:00
Nyall Dawson
73b75af8c3 Move prompt handling to QgsCodeEditor 2022-10-24 16:46:11 +10:00
Nyall Dawson
b7ffb0cb6f Move responsibility for storing history of run commands to base class 2022-10-24 16:46:11 +10:00
Nyall Dawson
3786cd178d Move python console history handling to base QgsCodeEditor class
So that other non-python-console code editors can utilise this too
2022-10-24 16:46:11 +10:00
Nyall Dawson
04dbee6eb7 Add a script language enum 2022-10-24 16:46:11 +10:00
Nyall Dawson
dd4984eb49 Move some common code to base class 2022-10-24 16:46:11 +10:00
Nyall Dawson
fcb83a7a30 Fix code folding not shown for non-python code editor classes 2022-10-10 14:01:24 +10:00
Nyall Dawson
39a4a63890 Promote to enum class 2022-10-10 14:01:24 +10:00
Nyall Dawson
ed54489a09 Move some useful python console methods to base class 2022-10-10 14:01:24 +10:00
Juergen E. Fischer
c6008b7ee1 fix MSVC build: reverts fee62e4, dff05dd and e3a77b9484c effectivly
reverting 3fb0f66 (followup #45348)

Using --no-public-is-protected (default on Windows) also works on Linux
and fixes #45331 too
2021-10-21 23:03:48 +02:00
nirvn
ef84e48a09 Run sipify_all.sh 2021-10-12 16:34:05 +10:00
Denis Rouzaud
ec16736306 run sipify 2021-10-12 16:34:05 +10:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Nyall Dawson
50b9beaad6 [sipify] Catch more class references and insert :py:class: annotations 2021-01-31 05:41:22 +10:00
Nyall Dawson
8d3e028d15 Cleanup raw margin manipulation used to hide holding controls, use proper methods 2020-10-13 14:14:53 +10:00
Nyall Dawson
1ac59415ec Cleanup handling of margins in QgsCodeEditor and subclasses 2020-10-13 14:14:53 +10:00
Nyall Dawson
5c8013df61 [console] Fix exception when running scripts (followup cce7aa7)
and move responsibility for showing warning messages to QgsCodeEditor
base class, so that the same code can be used by other dialog script editors
2020-10-12 13:06:34 +10:00
Nyall Dawson
c9fb3620db Fix fold icon colors in code editors -- allow these to be set so that
they can match the editor theme
2020-10-07 15:06:02 +10:00
Nyall Dawson
3098fa5906 Move code editor color scheme tracking to dedicated registry,
QgsCodeEditorColorSchemeRegistry

This cleans up the code, and makes it possible for creation of plugins
which add new code editor color schemes!
2020-10-06 17:11:34 +10:00
Nyall Dawson
1bafa2f66f Code shuffle: move QgsCodeEditor classes to their own folder 2020-10-06 17:11:34 +10:00