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
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
Salvatore Larosa
2cf6d11997
[pyqgis-console] revert changes for handy commands
2020-10-04 13:19:26 +10:00
Salvatore Larosa
f724793cf0
[pyqgis-console] a better attribute name
2020-10-04 13:19:26 +10:00
Salvatore Larosa
8533d9a89b
[pyqgis-console] restore the correct prompt
2020-10-04 13:19:26 +10:00
Nyall Dawson
ad946d45c8
Ensure colors in Python console match colors for Python editors
...
used elsewhere in the application
2020-10-04 05:02:57 +10:00
Matthias Kuhn
d5350c618c
Merge pull request #37602 from rduivenvoorde/console_base_class
...
Add/use simple BaseClass to Python Console classes
2020-09-12 08:53:15 +02:00
Richard Duivenvoorde
982e4f1262
Rename BaseClass to QgsPythonConsoleBase
2020-09-03 16:03:25 +02:00
Richard Duivenvoorde
354b9598ec
Move font, margin and caret code to baseclass
2020-08-27 18:26:54 +02:00
nirvn
38a7e7212a
[console] Fix error when console history file is missing
...
from the user profile directory (fixes #38142 )
2020-08-05 10:18:38 +07:00
Mathieu Pellerin
ebd4cd8c13
[python console] Match key up / down behavior to that of bash and
...
allow for a 'soft' history to be editable
This commit reverts the recent behavior change of a key up / down
press event which meant to prevent accidental loss of content of
a command being edited when pressing the up key on the second line
of a reflowed text.
This new approach has the python console input line behave like
bash, whereas a key up / down will always move to the next /
previous history item wherever the cursor is located. However until
the user hits enter, any edits to historical items or the new
line will be remembered.
This insures that an accidental move back in history doesn't
lead to unwanted code loss.
2020-07-13 08:32:09 +07:00
Richard Duivenvoorde
ab83e57cc8
Context menu 'Search selected in PyQGIS docs' in Console panes
2020-07-08 21:47:08 +02:00
Richard Duivenvoorde
a1fda50f95
Move setLexers to base
2020-07-08 21:17:27 +02:00
Richard Duivenvoorde
180a630363
Move icons to base and add some to items
2020-07-05 11:48:27 +02:00
Richard Duivenvoorde
5889f7df78
Add simple BaseClass
2020-07-04 16:36:47 +02:00
nirvn
af474eaf81
[python console] Deal with remaining vanishing prompt scenarios
2020-06-03 17:31:45 +07:00
nirvn
bbdc9068b0
[python console] Additional tweaks to new prompt
2020-06-03 14:15:09 +07:00
nirvn
2a25c1847d
[python console] Improve key up/down press for multiline command string
2020-06-03 14:15:09 +07:00
nirvn
296fc6cf89
[python console] Move the >>> prompt into the margin to fix a gazillion issues
2020-06-03 11:45:13 +07:00
Nyall Dawson
601a717174
Import 3d python library by default in console
2020-05-29 03:44:55 +10:00
Nyall Dawson
b6a7a10703
Fix some more python formatting issues, remove more flake exceptions
2020-05-11 11:41:50 +10:00
Nyall Dawson
d0c24edf7d
Import more useful libraries into console by default
2019-02-01 21:44:53 +11: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
Salvatore Larosa
059d0e21c4
[pyqgis-console] fix link to c++ api doc
2018-07-08 12:44:57 +02:00
Nyall Dawson
398e2a17dd
[console] Fix invalid regex warning
2018-06-22 13:37:58 +10:00
Salvatore Larosa
3edc07b4c2
also versioning cookbook url
2018-05-29 11:59:54 +02:00
Salvatore Larosa
8f5bde40cf
use https for cookbook url
2018-05-29 11:52:43 +02:00
Salvatore Larosa
fc740d7140
Fixes #19001 : update url to _pyqgis and _api commands
2018-05-28 08:42:45 +02:00
nirvn
45aca2f942
fix unclosed strings not style in python console & script editor
2018-05-23 10:08:02 +07:00
nirvn
9cf6bbf424
Improve default color scheme for python console & script editor
2018-05-22 17:56:25 +07:00
nirvn
45b045d212
Fix missing color settings for python console / script editor
2018-05-22 13:31:29 +07:00
Nyall Dawson
6d87a4cf3f
[console] Fix unclosed strings don't respect the preset font size
2018-05-22 15:43:14 +10:00
Salvatore Larosa
3a5fb9d7bd
Fixes #18526 : Pasting data from clipboard inside Python console causes the text cursor to be moved to the end of the row
2018-03-23 22:41:00 +01:00
Alexander Bruy
7823025b8d
[python console] remove 'u' prefixes from strings ( fix #18171 )
2018-02-23 10:39:08 +02:00
Juergen E. Fischer
325af48680
fix #18050 (followup f6269c41d)
2018-02-05 14:04:07 +01:00
Nyall Dawson
f6269c41da
[console] Allow breaking execution of scripts via Ctrl-C
...
This allows (in some circumstances) scripts running in the console
to be halted via the Ctrl (or Meta) + C shortcut.
(It's only possible to catch and abort when the script is printing
outputs to the console - because this triggers
QCoreApplication.processEvents() calls. Without these calls the
whole QGIS application is unresponsive during script execution
and there's no ability to even catch a shortcut in order to
halt the execution.
Still, even with this limitation it's handy to be able to
break out of lengthy:
for f in iface.activeLayer().getFeatures():
print(f.attributes())
loops!)
2018-01-30 09:58:31 +10:00
Nyall Dawson
069fadfc53
Import all qgis.gui, analysis, processing, and Qt classes by default
...
in Python console
Because it's a PITA to remember to manually import these all the time
2017-08-06 23:48:53 +10:00
Harrissou Sant-anna
15be88918f
Replace "double click" and "doubleclick" by double-click
2017-07-07 01:26:38 +02:00
Matthias Kuhn
0e09fdacde
Use monospace fonts for console on all platforms
2017-04-12 22:21:59 +02:00
Juergen E. Fischer
ecc5bb508e
pep8/pyflakes3 cleanups
2017-03-04 02:38:15 +01:00
Juergen E. Fischer
a10c890383
More QgsSettings updates:
...
* revives WMS
* QgsSettings::clear() added
* section added to QgsSettings::contains()
* type parameter added to sip binding of QgsSettings.value()
* TODO: customization & evis
2017-03-04 02:37:59 +01:00
Denis Rouzaud
4c3968b9aa
more spelling fixes
2017-01-20 15:06:09 +01:00
Denis Rouzaud
37ebcdd1cd
[spellcheck] allow inwords checks and line skipping
...
spell check will be done automatically in words by default (when some conditions are fulfilled)
possibility to avoid in words checking by adding :* at the end in spelling.dat
one can add #spellok at the end of a line of code to skip spell check on this line
2017-01-10 20:18:37 +01:00
Juergen E. Fischer
31df84aa6b
run 2to3 on source
2016-09-21 23:30:04 +02:00
Denis Rouzaud
8071acd064
move PyQt compat folder to python/qgis
2016-04-29 14:10:26 +02:00
Salvatore Larosa
0168bd5c68
[pyqgis-console] fix multi-line code execution
2016-03-31 22:53:10 +02:00