176 Commits

Author SHA1 Message Date
Nyall Dawson
11ee2fc809 Fix running unsaved script in console 2016-05-16 18:14:58 +10:00
Denis Rouzaud
8071acd064 move PyQt compat folder to python/qgis 2016-04-29 14:10:26 +02:00
Matthias Kuhn
166466159f QShortcut is in widgets, not gui 2016-04-15 11:25:27 +02:00
Matthias Kuhn
8047a569e3 Fix console import menu and add tests 2016-04-15 11:05:29 +02:00
Nyall Dawson
99210ecfd7 [FEATURE][console] Improvements to find functionality
- add key shortcut to open find widget, set focus to find text input
automatically (uses default shortcut for DE, eg usually Ctrl+F)
- add key shortcuts for find next/previous (using default DE
shortcut, eg Ctrl+G/Shift+Ctrl+G)
- automatically find first match when typing in find box
- set initial find string to selection when opening find
- pressing Escape closes the find bar
2016-04-15 07:51:58 +10:00
Matthias Kuhn
fe314754c6 Fix console errors 2016-04-14 12:15:12 +02:00
Salvatore Larosa
0168bd5c68 [pyqgis-console] fix multi-line code execution 2016-03-31 22:53:10 +02:00
Salvatore Larosa
20ce2343cb [pyqgis-console] fix import statement 2016-03-31 22:53:10 +02:00
Matthias Kuhn
e133b42896 Enable console with Python3 / PyQt5 2016-03-29 08:20:43 +02:00
Juergen E. Fischer
885d0ec993 python console: switch to pyqt wrappers and new style signals, flake8 fixes, show exceptions in console also with pyqt5 2016-03-21 17:00:25 +01:00
Juergen E. Fischer
c6d921729e python fixes:
* issues identified by pyflakes (star and unused imports)
* pyqtwrapper: add QtSvg
* some exceptions e.message => unicode(e)
* some translations tr("..." % foo) => tr("...") % foo
* TODO:
  python/console/console_sci.py:547 QsciScintillaCompat?
  python/plugins/db_manager/dlg_query_builder.py:304 pop_up_error?
2016-03-15 17:25:23 +01:00
Juergen E. Fischer
fb3fcfa3a0 Python3/Qt5/2to3 updates:
* pyqtwrappers update (add QtNetwork, QtXml, QtSql, QtTest, uic)
* 2to3 updates
* move QPyNullVariant/NULL to PyQt.QtCore
* add global unicode/basestring/long for Python3
* expand QtGui, QtCore module and star exports
* Qscintilla2
* replace Set import with set builtin
2016-03-14 20:38:20 +01:00
Nyall Dawson
d6346c882b Use clearer cut/copy/paste icons in python console 2016-02-26 11:46:52 +11:00
Nyall Dawson
72df8901f5 Clean up python console toolbars/menus:
- Consistent capitalization
- Add missing ellipsis
- Rename "settings" to "options" for consistency with main window
- Remove some excessive use of separators
2016-02-24 14:06:40 +11:00
Nyall Dawson
cbe8cb7282 Formatting update, using newer autopep8 version 2016-01-30 09:33:24 +11:00
Juergen E. Fischer
00633811c9 spelling fixes 2016-01-21 10:42:25 +01:00
Chris Mayo
6b42bad753 [pyqgis-console] Don't import pyqtconfig
pyqtconfig may not have been installed by PyQt4, leading to an error.

Was used to test for qt_version >= 0x40700 but CMakeLists.txt now checks
for QT_MIN_VERSION 4.8.0
2015-12-30 20:32:07 +00:00
Matthias Kuhn
0b6dd352c9 [py3] CMake updates to support Python3 and PyQt5 2015-11-16 07:42:47 +01:00
Nathan Woodrow
1b435ed965 [Py Console] Remove message on file change 2015-11-03 10:30:37 +10:00
Salvatore Larosa
c866dcce8f [pyqgis-console] fixes #13693: fix default value in settings for the last used directory when opening a script file 2015-10-28 14:52:29 +01:00
Nyall Dawson
9287ee7d40 [console] Move run button earlier in console editor toolbar
Otherwise on small screens the run button is hidden away in the
overflow menu, which isn't ideal given its importance
2015-10-11 16:36:10 +11:00
Juergen E. Fischer
b39055b39c indentation update (now including autopep8) 2015-08-22 14:29:41 +02:00
Nyall Dawson
46da64a88e [console] Better handling of default paths for open/save dialogs 2015-08-18 15:12:22 +10:00
Nyall Dawson
15e452e918 [console] Allow running unsaved script files
Previously a (non-default) option existed for auto-saving scripts
on run, which would overwrite the existing script file if set, or
save the script to a temporary file before running.

Now, the auto-save option only applies to scripts which have
already been saved an have a filename.

By default the console now can run scripts without filenames,
or scripts with changes by transparently saving them out to a
temporary file.
2015-08-18 15:12:14 +10:00
Nathan Woodrow
a05a970dff Add open in external editor to console 2015-08-17 23:25:26 +10:00
Nathan Woodrow
9acc475197 Move python console toolbar to top. More uniform with rest of UI 2015-08-08 23:09:20 +10:00
Salvatore Larosa
9838ea3dbd switch all png icons to svg ones for plus and minus signs:
followup 33b49ff and a7191ab
2015-06-22 16:22:56 +02:00
Nyall Dawson
310419566b Switch to 16x16 pixel icons for python console for consistency with other dock toolbars 2015-05-31 09:43:31 +10:00
Salvatore Larosa
f6a1b7e202 [pyqgis-console] fix missing import in compile apis script 2015-02-17 23:43:02 +01:00
Juergen E. Fischer
956c155e8f fix python pep8 warnings and fix some revealed errors
pep8 --ignore=E111,E128,E201,E202,E203,E211,E221,E222,E225,E226,E227,E231,E241,E261,E265,E272,E302,E303,E501,E701 \
     --exclude="ui_*.py,debian/*,python/ext-libs/*" \
     .
2015-02-01 20:46:47 +01:00
Juergen E. Fischer
d4f64d9bde indentation update and typo fixes 2014-11-13 23:13:13 +01:00
Salvatore Larosa
a0f8060f98 [pyqgis-console] small fix 2014-10-24 09:18:56 +02:00
Salvatore Larosa
5a01b98e3c [pyqgis-console] restore previously loaded scripts only when editor is instanced 2014-10-08 15:34:35 +02:00
Nathan Woodrow
4d30e05447 [Python Console] Don't set custom background for editor toolbar 2014-10-02 23:06:02 +10:00
Nathan Woodrow
380baa2f0c Simplify python console init text 2014-09-12 21:24:17 +10:00
Nathan Woodrow
d42c24f28c Restore tabs on Python console load 2014-08-13 22:43:58 +10:00
Juergen E. Fischer
3f6233079b python console: workaround for PyQt 4.11 problem 2014-06-17 13:10:58 +02:00
Larry Shaffer
3213d014f3 Refactor plugin staging to build dir and python script compiling 2014-05-20 21:28:42 -06:00
Juergen E. Fischer
5397dfe538 update qgis.org links 2014-02-07 21:02:11 +01:00
Salvatore Larosa
1bf41063ca [pyqgis-console] fixes save as action in editor 2014-01-08 18:33:19 +01:00
Salvatore Larosa
f21562c86f [pyqgis-console] fixes #9097 (thanks to Minoru Akagi) 2013-12-02 08:05:06 +01:00
Salvatore Larosa
dcfccbc758 [pyqgis-console] avoid processEvents for stderr output 2013-12-02 08:05:06 +01:00
Salvatore Larosa
a411e79fa7 [pyqgis-console] add save button to history dialog, minor fixes for c38b8cb 2013-11-02 18:40:26 +01:00
Salvatore Larosa
5f916b4009 [pyqgis-console] fixes some translation string 2013-11-02 18:40:26 +01:00
Salvatore Larosa
c4b5812cf9 [pyqgis-console] allows to remove entries from command history dialog 2013-11-02 18:40:26 +01:00
Juergen E. Fischer
ec0f0bea28 indentation update and a few fixed typos 2013-10-24 15:26:39 +02:00
Salvatore Larosa
9de5745520 [pyqgis-console] Sets minimum height for input area based of font metric 2013-10-03 11:09:18 +02:00
Salvatore Larosa
049edb2b10 [pyqgis-console] added more settings for fonts color 2013-09-19 13:17:13 +02:00
Salvatore Larosa
2d728d7f4c [pyqgis-console] reject changes in settings if they are not applied 2013-09-17 00:12:22 +02:00
Salvatore Larosa
dc1824f560 [pyqgis-console] added some typing setting:
- auto insertion "import" string
- auto insertion "):" for classes and methods
2013-09-15 23:31:46 +02:00