Skip to content
Permalink
Browse files

Merge branch 'master' of https://github.com/qgis/Quantum-GIS into sty…

…les_to_db

Conflicts:
	python/console/console_editor.py
  • Loading branch information
Emilio Loi
Emilio Loi committed Apr 29, 2013
2 parents 723ad4c + 1959182 commit c499df74a35954982a8ca05c3c96552520b312b9
Showing with 12,820 additions and 8,881 deletions.
  1. +23 −23 doc/TRANSLATORS
  2. +3,916 −2,958 i18n/qgis_da_DK.ts
  3. +317 −271 i18n/qgis_de.ts
  4. +3,944 −3,117 i18n/qgis_fr.ts
  5. +3,053 −2,123 i18n/qgis_gl_ES.ts
  6. +2 −2 ms-windows/osgeo4w/browser.bat.tmpl
  7. +4 −4 ms-windows/osgeo4w/package-nightly.cmd
  8. +4 −4 ms-windows/osgeo4w/package.cmd
  9. +1 −1 ms-windows/osgeo4w/qgis.bat.tmpl
  10. +2 −2 python/console/console.py
  11. +13 −7 python/console/console_output.py
  12. +38 −15 python/console/console_sci.py
  13. +96 −30 python/console/console_settings.py
  14. +460 −202 python/console/console_settings.ui
  15. +51 −0 python/gui/qgisinterface.sip
  16. +15 −6 python/plugins/GdalTools/tools/doRasterize.py
  17. +155 −13 python/plugins/GdalTools/tools/widgetRasterize.ui
  18. +4 −4 python/plugins/plugin_installer/installer_data.py
  19. +3 −3 python/plugins/plugin_installer/metadata.txt
  20. +11 −7 python/plugins/sextante/SextantePlugin.py
  21. +31 −21 python/plugins/sextante/commander/CommanderWindow.py
  22. +1 −1 python/plugins/sextante/gui/HistoryDialog.py
  23. +81 −4 python/plugins/sextante/gui/help/algclasssification.txt
  24. +1 −1 python/plugins/sextante/otb/OTBAlgorithm.py
  25. +0 −21 python/plugins/sextante/otb/description/RadiometricVegetationIndices.txt
  26. +0 −20 python/plugins/sextante/otb/description/RadiometricWaterIndices.txt
  27. +17 −0 resources/function_help/color_cmyk-en_US
  28. +18 −0 resources/function_help/color_cmyka-en_US
  29. +16 −0 resources/function_help/color_hsl-en_US
  30. +17 −0 resources/function_help/color_hsla-en_US
  31. +16 −0 resources/function_help/color_hsv-en_US
  32. +17 −0 resources/function_help/color_hsva-en_US
  33. +14 −0 resources/function_help/regexp_match-en_US
  34. +4 −4 resources/function_help/regexp_replace-en_US
  35. +25 −0 src/app/qgisapp.cpp
  36. +45 −0 src/app/qgisapp.h
  37. +25 −0 src/app/qgisappinterface.cpp
  38. +45 −0 src/app/qgisappinterface.h
  39. +149 −1 src/core/qgsexpression.cpp
  40. +51 −0 src/gui/qgisinterface.h
  41. +0 −2 src/gui/qgsrubberband.cpp
  42. +10 −0 tests/src/core/testqgsexpression.cpp
  43. +19 −14 tests/src/core/testziplayer.cpp
  44. +1 −0 tests/src/gui/CMakeLists.txt
  45. +105 −0 tests/src/gui/testqgsrubberband.cpp
  46. BIN tests/testdata/zip/testtar.tgz
  47. BIN tests/testdata/zip/testzip.zip

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -1,7 +1,7 @@
@echo off
call "~dp0\o4w_env.bat
call "%~dp0\o4w_env.bat"
call "%OSGEO4W_ROOT%"\apps\grass\grass-@grassversion@\etc\env.bat
@echo off
path %PATH%;%OSGEO4W_ROOT%\apps\@package@\bin;%OSGEO4W_ROOT%\apps\grass\grass-@grassversion@\lib
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@
start "Quantum GIS Browser" /B "%OSGEO4W_ROOT%"\bin\@package@-browser.exe %*
start "Quantum GIS Browser" /B "%OSGEO4W_ROOT%"\bin\@package@-browser-bin.exe %*
@@ -174,14 +174,14 @@ REM del %OSGEO4W_ROOT%\apps\%PACKAGENAME%\python\qgis\qgisconfig.py

touch exclude

move %OSGEO4W_ROOT%\apps\%PACKAGENAME%\bin\qgis.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%.exe
move %OSGEO4W_ROOT%\apps\%PACKAGENAME%\bin\qbrowser.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%-browser.exe
move %OSGEO4W_ROOT%\apps\%PACKAGENAME%\bin\qgis.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%-bin.exe
move %OSGEO4W_ROOT%\apps\%PACKAGENAME%\bin\qbrowser.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%-browser-bin.exe

tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
--exclude-from exclude ^
apps/%PACKAGENAME% ^
bin/%PACKAGENAME%.exe ^
bin/%PACKAGENAME%-browser.exe ^
bin/%PACKAGENAME%-bin.exe ^
bin/%PACKAGENAME%-browser-bin.exe ^
bin/%PACKAGENAME%.bat.tmpl ^
bin/%PACKAGENAME%-browser.bat.tmpl ^
apps/qt4/plugins/sqldrivers/qsqlocispatial.dll ^
@@ -224,13 +224,13 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-server-%VERSION%-%PACKAGE%.tar.bz2 ^
>>%LOG% 2>&1
if errorlevel 1 goto error

move %OSGEO4W_ROOT%\apps\%PACKAGENAME%\bin\qgis.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%.exe
move %OSGEO4W_ROOT%\apps\%PACKAGENAME%\bin\qbrowser.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%-browser.exe
move %OSGEO4W_ROOT%\apps\%PACKAGENAME%\bin\qgis.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%-bin.exe
move %OSGEO4W_ROOT%\apps\%PACKAGENAME%\bin\qbrowser.exe %OSGEO4W_ROOT%\bin\%PACKAGENAME%-browser-bin.exe
tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
--exclude-from exclude ^
--exclude "*.pyc" ^
"bin/%PACKAGENAME%-browser.exe" ^
"bin/%PACKAGENAME%.exe" ^
"bin/%PACKAGENAME%-browser-bin.exe" ^
"bin/%PACKAGENAME%-bin.exe" ^
"apps/%PACKAGENAME%/bin/qgis.reg.tmpl" ^
"apps/%PACKAGENAME%/i18n/" ^
"apps/%PACKAGENAME%/icons/" ^
@@ -4,4 +4,4 @@ call "%OSGEO4W_ROOT%"\apps\grass\grass-@grassversion@\etc\env.bat
@echo off
path %PATH%;%OSGEO4W_ROOT%\apps\@package@\bin;%OSGEO4W_ROOT%\apps\grass\grass-@grassversion@\lib
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@
start "Quantum GIS" /B "%OSGEO4W_ROOT%"\bin\@package@.exe %*
start "Quantum GIS" /B "%OSGEO4W_ROOT%"\bin\@package@-bin.exe %*
@@ -606,9 +606,9 @@ def openSettings(self):
self.options.exec_()

def prefChanged(self):
self.shell.refreshLexerProperties()
self.shell.settingsShell()
self.shellOut.refreshLexerProperties()
self.tabEditorWidget.changeFont()
self.tabEditorWidget.refreshSettingsEditor()

def callWidgetMessageBar(self, text):
self.shellOut.widgetMessageBar(iface, text)
@@ -39,7 +39,7 @@ def __init__(self, shellOut, out=None, style=None):
self.style = style

def write(self, m):
if self.style == "traceback":
if self.style == "_traceback":
# Show errors in red
pos = self.sO.SendScintilla(QsciScintilla.SCI_GETCURRENTPOS)
self.sO.SendScintilla(QsciScintilla.SCI_STARTSTYLING, pos, 31)
@@ -73,6 +73,8 @@ def __init__(self, parent=None):
self.parent = parent
self.shell = self.parent.shell

self.settings = QSettings()

# Creates layout for message bar
self.layout = QGridLayout(self)
self.layout.setContentsMargins(0, 0, 0, 0)
@@ -88,7 +90,7 @@ def __init__(self, parent=None):
self.setUtf8(True)

sys.stdout = writeOut(self, sys.stdout)
sys.stderr = writeOut(self, sys.stderr, "traceback")
sys.stderr = writeOut(self, sys.stderr, "_traceback")

self.insertInitText()
self.setLexers()
@@ -137,9 +139,8 @@ def refreshLexerProperties(self):
def setLexers(self):
self.lexer = QsciLexerPython()

settings = QSettings()
loadFont = settings.value("pythonConsole/fontfamilytext", "Monospace").toString()
fontSize = settings.value("pythonConsole/fontsize", 10).toInt()[0]
loadFont = self.settings.value("pythonConsole/fontfamilytext", "Monospace").toString()
fontSize = self.settings.value("pythonConsole/fontsize", 10).toInt()[0]
font = QFont(loadFont)
font.setFixedPitch(True)
font.setPointSize(fontSize)
@@ -165,6 +166,7 @@ def contextMenuEvent(self, e):
iconRun = QgsApplication.getThemeIcon("console/iconRunConsole.png")
iconClear = QgsApplication.getThemeIcon("console/iconClearConsole.png")
iconHideTool = QgsApplication.getThemeIcon("console/iconHideToolConsole.png")
iconSettings = QgsApplication.getThemeIcon("console/iconSettingsConsole.png")
hideToolBar = menu.addAction(iconHideTool,
"Hide/Show Toolbar",
self.hideToolBar)
@@ -187,6 +189,10 @@ def contextMenuEvent(self, e):
selectAllAction = menu.addAction("Select All",
self.selectAll,
QKeySequence.SelectAll)
menu.addSeparator()
settingsDialog = menu.addAction(iconSettings,
"Settings",
self.parent.openSettings)
runAction.setEnabled(False)
clearAction.setEnabled(False)
copyAction.setEnabled(False)
@@ -208,7 +214,7 @@ def hideToolBar(self):
self.shell.setFocus()

def showEditor(self):
Ed = self.parent.widgetEditor
Ed = self.parent.splitterObj
if not Ed.isVisible():
Ed.show()
self.parent.showEditorButton.setChecked(True)
@@ -242,4 +248,4 @@ def keyPressEvent(self, e):

def widgetMessageBar(self, iface, text):
timeout = iface.messageTimeout()
self.infoBar.pushMessage('Console', text, QgsMessageBar.INFO, timeout)
self.infoBar.pushMessage(text, QgsMessageBar.INFO, timeout)
@@ -43,6 +43,8 @@ def __init__(self, parent=None):

self.parent = parent

self.settings = QSettings()

# Enable non-ascii chars for editor
self.setUtf8(True)

@@ -74,8 +76,7 @@ def __init__(self, parent=None):
# Set Python lexer
self.setLexers()

self.setAutoCompletionThreshold(2)
self.setAutoCompletionSource(self.AcsAPIs)
self.settingsShell()

# Don't want to see the horizontal scrollbar at all
# Use raw message to Scintilla here (all messages are documented
@@ -103,16 +104,41 @@ def __init__(self, parent=None):
self.newShortcutCAS = QShortcut(QKeySequence(Qt.CTRL + Qt.ALT + Qt.Key_Space), self)
self.newShortcutCSS.setContext(Qt.WidgetShortcut)
self.newShortcutCAS.setContext(Qt.WidgetShortcut)
self.newShortcutCAS.activated.connect(self.autoComplete)
self.newShortcutCAS.activated.connect(self.autoCompleteKeyBinding)
self.newShortcutCSS.activated.connect(self.showHistory)
self.connect(self, SIGNAL('userListActivated(int, const QString)'),
self.completion_list_selected)

def settingsShell(self):
self.setLexers()
threshold = self.settings.value("pythonConsole/autoCompThreshold", 2).toInt()[0]
self.setAutoCompletionThreshold(threshold)
radioButtonSource = self.settings.value("pythonConsole/autoCompleteSource", 'fromAPI').toString()
autoCompEnabled = self.settings.value("pythonConsole/autoCompleteEnabled", True).toBool()
self.setAutoCompletionThreshold(threshold)
if autoCompEnabled:
if radioButtonSource == 'fromDoc':
self.setAutoCompletionSource(self.AcsDocument)
elif radioButtonSource == 'fromAPI':
self.setAutoCompletionSource(self.AcsAPIs)
elif radioButtonSource == 'fromDocAPI':
self.setAutoCompletionSource(self.AcsAll)
else:
self.setAutoCompletionSource(self.AcsNone)

def showHistory(self):
self.showUserList(1, QStringList(self.history))

def autoComplete(self):
self.autoCompleteFromAll()
def autoCompleteKeyBinding(self):
radioButtonSource = self.settings.value("pythonConsole/autoCompleteSource").toString()
autoCompEnabled = self.settings.value("pythonConsole/autoCompleteEnabled").toBool()
if autoCompEnabled:
if radioButtonSource == 'fromDoc':
self.autoCompleteFromDocument()
elif radioButtonSource == 'fromAPI':
self.autoCompleteFromAPIs()
elif radioButtonSource == 'fromDocAPI':
self.autoCompleteFromAll()

def commandConsole(self, command):
if not self.is_cursor_on_last_line():
@@ -136,9 +162,9 @@ def commandConsole(self, command):

def setLexers(self):
self.lexer = QsciLexerPython()
settings = QSettings()
loadFont = settings.value("pythonConsole/fontfamilytext", "Monospace").toString()
fontSize = settings.value("pythonConsole/fontsize", 10).toInt()[0]

loadFont = self.settings.value("pythonConsole/fontfamilytext", "Monospace").toString()
fontSize = self.settings.value("pythonConsole/fontsize", 10).toInt()[0]

font = QFont(loadFont)
font.setFixedPitch(True)
@@ -157,11 +183,11 @@ def setLexers(self):
self.lexer.setFont(font, 4)

self.api = QsciAPIs(self.lexer)
chekBoxAPI = settings.value("pythonConsole/preloadAPI", True).toBool()
chekBoxAPI = self.settings.value("pythonConsole/preloadAPI", True).toBool()
if chekBoxAPI:
self.api.loadPrepared( QgsApplication.pkgDataPath() + "/python/qsci_apis/pyqgis_master.pap" )
else:
apiPath = settings.value("pythonConsole/userAPI").toStringList()
apiPath = self.settings.value("pythonConsole/userAPI").toStringList()
for i in range(0, len(apiPath)):
self.api.load(QString(unicode(apiPath[i])))
self.api.prepare()
@@ -242,9 +268,6 @@ def new_prompt(self, prompt):
self.ensureCursorVisible()
self.ensureLineVisible(line)

def refreshLexerProperties(self):
self.setLexers()

def displayPrompt(self, more=False):
self.append("... ") if more else self.append(">>> ")
self.move_cursor_to_end()
@@ -461,7 +484,7 @@ def currentCommand(self):
return cmd

def runCommand(self, cmd):
self.write_stdout(cmd)
self.writeCMD(cmd)
import webbrowser
self.updateHistory(cmd)
line, pos = self.getCursorPosition()
@@ -502,7 +525,7 @@ def runCommand(self, cmd):
def write(self, txt):
sys.stderr.write(txt)

def write_stdout(self, txt):
def writeCMD(self, txt):
if len(txt) > 0:
getCmdString = self.text()
prompt = getCmdString[0:4]

0 comments on commit c499df7

Please sign in to comment.
You can’t perform that action at this time.