Nyall Dawson
941adaa4a8
Some more code to base class
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
374dcbab53
Minor cleanups
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
34227bdf1c
Fix broken logic in clearing python console history
...
- clearing session was also clearing the file history
- clearing file history was doing nothing
2022-10-12 08:22:34 +10:00
Nyall Dawson
ed54489a09
Move some useful python console methods to base class
2022-10-10 14:01:24 +10:00
Hannes
cb914be6f3
Fix PEP8 E266 for second level heading comment
2022-09-04 06:05:10 +10:00
Hannes
ccb46e79d8
Python Console: Don't throw exception if compiled without 3D
...
Fixes #49987
2022-09-04 06:05:10 +10:00
nicogodet
c7207f58f1
Remove asterisk from file name when using Save
2022-04-11 08:22:33 +02:00
nicogodet
b8b2ceed95
Remove asterisk from file name when using Save As...
2022-04-11 08:22:20 +02:00
Nyall Dawson
d00356a0fa
[console] Use a more modern approach to running script files, to
...
avoid 'unclosed file' warnings dumped whenever script files
are run through the Python console
2022-01-18 15:23:08 +10:00
Nyall Dawson
550a1d3a52
Factories can specify a path to add their pages to the options tree
2021-07-29 15:48:53 +10: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
Nyall Dawson
8113aac88e
Use a monospaced font in console command history list
2021-06-14 13:04:59 +10:00
Denis Rouzaud
da08c8a435
[cmake] generalize Python output directory in UseTest macro ( #43191 )
...
* [cmake] generalize Python output directory in UseTest macro
this is helpful in case we set up another python output directory (eg PySide2)
* define python output directories to the parent scope
* try with target_include_directories
* define vars on top level
* Update UsePythonTest.cmake
* some cleanup
* more cleanup
* fix uic
* fix path for all platforms
* fix var
2021-05-13 07:32:03 +02:00
Andrea Giudiceandrea
ea4131a5d7
Fix opening the console
...
when an error occurs (specifically when 3d library is not built) before the console is displayed.
2021-04-21 08:15:39 +10:00
Nyall Dawson
12905ccf4e
Gracefully handle import errors in console
...
Fixes opening the console when 3d library is not built
Fixes #41855
2021-04-04 06:40:55 +10:00
Nyall Dawson
0f54df6675
[console] Prepend introductory text with '#' to avoid attempting to format it as Python code
2021-03-31 05:22:12 +10:00
Nyall Dawson
18d8a76009
Fix incorrect capitalization
2021-03-31 05:22:12 +10:00
Denis Rouzaud
eddf6feb45
modernize CMakeLists.txt files
2020-11-12 07:14:46 +10:00
Salvatore Larosa
a65143e8bc
[pyqgis-console] select last row of history: address @uclaros comment
2020-10-24 05:49:33 +10:00
Salvatore Larosa
2748215b20
[pyqgis-console] fix spell check
2020-10-24 05:49:33 +10:00
Salvatore Larosa
77c4823b50
[pyqgis-console] set focus to run button in history dialog and renaming label to run button
2020-10-24 05:49:33 +10:00
Salvatore Larosa
c0f09aa8e0
followup ae6ed7d: fix name of QPushButton
2020-10-24 05:49:33 +10:00
Salvatore Larosa
6eec68ad74
[pyqgis-console] run multiple items selected from command history dialogy
2020-10-24 05:49:33 +10:00
Salvatore Larosa
deacc51e1e
[pyqgis-console] use play icon to run single command
2020-10-20 08:25:16 +10:00
Salvatore Larosa
3c0fb94880
[pyqgis-console] use asterisk to track changes in script
2020-10-20 06:59:24 +10:00
Salvatore Larosa
7b7a909318
Merge pull request #39350 from uclaros/fix-del-console-history
...
Fix deleting python console history entries
2020-10-13 20:45:05 +02:00
uclaros
1f26bb03f4
Fix deleting python console history entries
2020-10-13 20:11:31 +03: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
Salvatore Larosa
cce7aa7315
[pyqgis-console] restore marker icon for syntax check
2020-10-12 09:49:45 +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
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
e7a34f33cb
Console options widget is not a dialog
2020-10-06 03:57:50 +10:00
Nyall Dawson
33f50496d7
Fix bad merge
2020-10-06 03:57:50 +10:00
Nyall Dawson
ec2b21001e
Ensure autocomplete correctly works for all QgsCodeEditorPython instances
2020-10-06 03:57:50 +10:00
Nyall Dawson
8ec7f0e69c
Remove QgsPythonConsoleBase so that we have a single definitive Python editor class (QgsCodeEditorPython)
2020-10-06 03:57:50 +10:00
nirvn
f67515c674
[console] Additional tweaks to looks of console input/output area
2020-10-05 17:18:43 +07:00
Nyall Dawson
3db9e52e31
Cleanup inconsistent margins in options dialog
2020-10-05 19:26:23 +10:00
Nyall Dawson
d12dcf3c49
Cleanup layout resizing for Python Console settings tab
2020-10-05 19:26:23 +10:00
Nyall Dawson
bb8cb8b6b0
Fix duplicate margins show in python console
2020-10-05 18:37:46 +10:00
Nyall Dawson
bc55102eb8
Move icon references back out of QgsPythonConsoleBase
2020-10-05 18:37:46 +10:00
Nyall Dawson
e66a0a025b
Move more code out of QgsPythonConsoleBase
2020-10-05 18:37:46 +10:00
Nyall Dawson
d9782a12f5
Move more code to QgsCodeEditorPython base class
2020-10-05 13:24:46 +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