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
a34669e784
Add code editor color scheme option for search match highlight color
2024-05-10 06:11:36 +10:00
Nyall Dawson
1e8c00354f
Move QgsCodeEditorWidget to a new file
2024-05-08 11:56:35 +10:00
Nyall Dawson
8654d57f16
Rename methods for clarity
2024-05-08 11:56:35 +10:00
Nyall Dawson
347191e797
Add since
2024-05-08 11:56:35 +10:00
Nyall Dawson
b7f0770633
Introduce QgsCodeEditorWidget
...
This widget wraps an existing QgsCodeEditor object in a widget which provides
additional standard functionality, currently a line-for-line port of the Python
console script editor search tools.
The caller must create an unparented QgsCodeEditor object
(or a subclass of QgsCodeEditor) first, and then construct a
QgsCodeEditorWidget passing this object to the constructor.
Ideally, this functionality would be added to the base QgsCodeEditor
class itself. But this is NOT possible without considerable API
breakage, as QgsCodeEditor currently inherits the QsciScintilla widget.
We cannot change QgsCodeEditor to inherit a generic QWidget
container containing a QsciScintilla widget + other widgets in
a layout without breaking API. I've added a cleanup note for
QGIS 4.0 here.
2024-05-08 11:56:35 +10:00
Even Rouault
a68422b982
Various typo fixes
...
Including 3 public methods, which are deprecated by this commit and replaced by a typo-fixed version
2024-02-29 06:03:03 +10:00
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
8282b6631e
Add QgsCodeEditorShell code editor subclass for Bash or Batch scripts
2023-04-24 15:26:50 +10:00
Nyall Dawson
895a68faee
Expose 'Search Selection in PyQGIS docs' action for all python code editors
2023-04-06 08:32:41 +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
Yoann Quenach de Quivillic
443df70628
Add Toggle comment capability to the Html Editor
2023-03-31 05:56:14 +10:00
Nyall Dawson
1822998bda
[feature][console] Allow Python console to be toggled between a dock
...
widget and a full main window dialog
Adds the same toggle button as we use for 3d map canvases and attribute
tables to make it super-easy to switch the Python console to a full
main window.
2023-03-30 12:40:06 +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
Yoann Quenach de Quivillic
a4469591a7
Add reformat capability to the HTML editor
2023-03-28 05:53:33 +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
Yoann Quenach de Quivillic
74c60488f2
Fix sip
2023-01-11 07:33:27 +10:00
Yoann Quenach de Quivillic
59332e0984
Fix sip
2023-01-11 07:33:27 +10:00
Yoann Quenach de Quivillic
88a683fec3
Fix style
2023-01-11 07:33:27 +10:00
Yoann Quenach de Quivillic
eade013151
Document versioon added
2023-01-11 07:33:27 +10:00
Yoann Quenach de Quivillic
da260a7a46
add helper functions to get cursor context info
2023-01-11 07:33:27 +10:00
Yoann Quenach de Quivillic
1c79b4927d
[feature][console] Add toggle comment action in the python console ( #50341 )
...
Adds a toggle comment action in the Python Console and script editors
2023-01-07 09:27:08 +10:00
Nyall Dawson
f4280a77f2
Fix dox warning
2022-10-24 16:46:11 +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
1e18322722
Add QgsCodeEditorR code editor subclass for R scripts
2022-10-22 18:46:41 +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
Alessandro Pasotti
7460e4f777
Doxy
2021-07-06 21:00:55 +02:00
Alessandro Pasotti
927669df2b
Move target to 3.22
2021-07-06 20:59:58 +02:00
Alessandro Pasotti
27eb5743ad
Provider QSCI APIs for sqlite and PG
2021-07-06 20:58:36 +02:00