Nyall Dawson
928bdd8cc4
Fix tooltip formatting for console actions
...
The tooltip text should be in bold, not the shortcut
2025-10-01 13:46:41 +10:00
Nyall Dawson
1db5d1d246
Add common actions for run script, run selection
...
Allows these shortcuts to be customised
2025-10-01 13:46:41 +10:00
Nyall Dawson
c6accd8517
Fix more misleading names
...
These objects are actions, not buttons
2025-10-01 13:46:41 +10:00
Nyall Dawson
41962a0a24
Use correct user-set shortcuts for console script editor code actions
...
And rename member variable for correctness
2025-10-01 13:46:41 +10:00
Nyall Dawson
d9a4c80aa9
Rename method to more generic name
2025-10-01 13:46:41 +10:00
github-actions[bot]
beb3e987f0
auto-fix pre-commit issues
2025-09-29 21:52:09 +00:00
Trex
a5f3530fae
Follow-up to Fix #40120 : Python console editor buttons now have shortcuts in tooltips.
2025-09-30 07:51:07 +10:00
Trexerx
65cfee669c
Uppercase letter E in button tooltip
...
Co-authored-by: Andrea Giudiceandrea <andreaerdna@libero.it>
2025-09-30 07:51:07 +10:00
Trex
3d316b1bb1
Follow-up to Fix #40120 : Setting shortcut moved from console_editor.py to console.py
2025-09-30 07:51:07 +10:00
Trex
652159f079
Fix #40120 : Added Run Selected button to python console editor toolbar.
2025-09-30 07:51:07 +10:00
Trex
81e9b9ad47
Fix #40120 : Added Run Selected button to python console editor toolbar.
2025-09-30 07:51:07 +10:00
Mathieu Pellerin
efdb16ef36
Qt6 compatibility
2025-01-30 08:47:29 +10:00
Mathieu Pellerin
8f9024bcb6
Address review
2025-01-30 08:47:29 +10:00
Denis Rouzaud
0f032e5f2d
run pre-commit on all files
2024-11-29 15:38:02 +01:00
Nyall Dawson
73ff4adc7e
Rename "Python Console" settings page to "Python"
...
These settings apply outside of the console, eg in the processing
script editor, so using "Python Console" is misleading.
2024-06-22 06:41:05 +10:00
Nyall Dawson
b1947bfa8a
Fix console script editor tries to save as ".py.py"
2024-06-18 05:23:57 +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
4a4c624e3e
Fix python script editor "open in external editor" action
...
When a system has a EDITOR environment variable set to either
an invalid editor, or an editor which requires a terminal (eg
nano/vim), then fallback to the QDesktopServices approach
to opening the script
Avoids this button doing nothing.
2024-06-07 20:46:45 +10:00
Nyall Dawson
eece497f3e
Remove redundant coding lines
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
249cc6d591
[console] Clean up objects a little
...
- Don't use ambiguous .parent members, use explicit names
- Add some typehints
2024-05-10 13:56:49 +10:00
Nyall Dawson
4dcdddaa02
[console] Don't needlessly store QgsSettings objects
...
These are cheap to construct by design, so we can avoid
storing them and the messy cross-class access to member
variables
2024-03-07 14:17:22 +01:00
Nyall Dawson
e42abf7dc5
Update python files
2024-01-22 05:46:15 +10:00
Nyall Dawson
c16a1e2b3d
Update enums
2024-01-19 19:44:48 +10:00
Nyall Dawson
4fc5138a28
Upgrade some enum members which are invisible to python introspection
2024-01-19 19:44:48 +10:00
Nyall Dawson
29a87bf0fc
Fix enums in console
2024-01-19 19:44:48 +10:00
Yoann Quenach de Quivillic
d798fd0732
Use embedded messageBar in showMessage
2023-04-18 14:55:32 +10:00
Nyall Dawson
6612506d7b
Remove outdated code
2023-03-30 12:40:06 +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
Yoann Quenach de Quivillic
00d279e999
Fix merge error
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
364bb96850
Change wording format->reformat
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
ef6de1ff2c
Add format code action in Python Console Editor
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
fc3847def7
Fix bug introduced by #51913 - Proxy EditorTab attributes to Editor
2023-03-03 12:17:01 +10:00
Yoann Quenach de Quivillic
9c56921cca
Clean up code and fix shortcuts
2023-02-21 14:27:36 +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
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
nicogodet
b8b2ceed95
Remove asterisk from file name when using Save As...
2022-04-11 08:22:20 +02:00
Nyall Dawson
174d5ee9e0
Ensure python script files saved in the Python console editor use
...
.py file extension
2021-07-01 15:40:20 +10:00
Salvatore Larosa
deacc51e1e
[pyqgis-console] use play icon to run single command
2020-10-20 08:25:16 +10:00
Salvatore Larosa
cce7aa7315
[pyqgis-console] restore marker icon for syntax check
2020-10-12 09:49:45 +10:00
Nyall Dawson
31dba5453b
Fix test
2020-10-06 17:04:49 +10:00
Nyall Dawson
9093bdfd1e
Don't silently close QGIS with unsaved changes in the console script
...
editors
Instead prompt the user what to do with these changes
Fixes #38529
2020-10-06 17:04:49 +10:00
Nyall Dawson
527e8850ef
Add universal last-resort signal QgsGui::optionsChanged()
...
This signal is emitted whenever the application options have been changed.
This signal is a "blanket" signal, and will be emitted whenever the options dialog
has been accepted regardless of whether or not individual settings are changed.
It is designed as a "last resort" fallback only, allowing widgets to respond
to possible settings changes.
2020-10-05 13:24:46 +10:00
Salvatore Larosa
4fea3ed822
[pyqgis-console] move console options to main app options
2020-10-03 09:11:32 +10:00
Salvatore Larosa
e17913c6ea
[pyqgis-console] add search icon to filterlineedit
2020-09-27 11:14:38 +02:00
Salvatore Larosa
bc71fae005
[pyqgis-console] fix byte conversion
2020-09-21 17:19:57 +02:00
nirvn
2f36e18d11
[python console] Add help links to the PyQGIS API and Cookbook pages
2020-06-03 11:45:13 +07:00
Nyall Dawson
cce5c4e802
[console] Correctly save settings when exiting app
...
The closeEvent approach which was previously used is not reliable
on application exit, so manually force a settings save in this case too.
Avoids loss of command history when closing QGIS
Also remove the manual "Save" history action, as it's redundant
2018-12-06 05:42:47 +10:00
nirvn
6b3ebfc019
harmonize open script icons
2018-05-20 15:50:31 +07:00