Skip to content
Permalink
Browse files
remove trailing blanks
  • Loading branch information
jef-n committed Dec 9, 2012
1 parent 05746de commit 9721736fd8ca65636910b5e442c2219a92fb8ce5
Showing with 1,539 additions and 1,540 deletions.
  1. +17 −17 python/console/console.py
  2. +2 −2 python/console/console_help.py
  3. +38 −38 python/console/console_output.py
  4. +59 −59 python/console/console_sci.py
  5. +15 −15 python/console/console_settings.py
  6. +9 −9 python/plugins/GdalTools/tools/GdalTools_utils.py
  7. +2 −2 python/plugins/GdalTools/tools/doBuildVRT.py
  8. +1 −1 python/plugins/GdalTools/tools/doClipper.py
  9. +12 −12 python/plugins/GdalTools/tools/doDEM.py
  10. +3 −3 python/plugins/GdalTools/tools/doGrid.py
  11. +3 −3 python/plugins/GdalTools/tools/doMerge.py
  12. +1 −1 python/plugins/GdalTools/tools/doPolygonize.py
  13. +2 −2 python/plugins/GdalTools/tools/doRasterize.py
  14. +4 −4 python/plugins/GdalTools/tools/doSettings.py
  15. +2 −2 python/plugins/GdalTools/tools/doWarp.py
  16. +2 −2 python/plugins/GdalTools/tools/inOutSelector.py
  17. +3 −3 python/plugins/GdalTools/tools/widgetPluginBase.py
  18. +2 −2 python/plugins/db_manager/db_manager.py
  19. +1 −1 python/plugins/db_manager/db_manager_plugin.py
  20. +22 −22 python/plugins/db_manager/db_model.py
  21. +4 −4 python/plugins/db_manager/db_plugins/connector.py
  22. +6 −6 python/plugins/db_manager/db_plugins/data_model.py
  23. +15 −15 python/plugins/db_manager/db_plugins/info_model.py
  24. +10 −10 python/plugins/db_manager/db_plugins/plugin.py
  25. +98 −98 python/plugins/db_manager/db_plugins/postgis/connector.py
  26. +5 −5 python/plugins/db_manager/db_plugins/postgis/info_model.py
  27. +4 −4 python/plugins/db_manager/db_plugins/postgis/plugin.py
  28. +9 −9 python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview/__init__.py
  29. +2 −2 python/plugins/db_manager/db_plugins/postgis/plugins/versioning/__init__.py
  30. +11 −11 python/plugins/db_manager/db_plugins/postgis/plugins/versioning/dlg_versioning.py
  31. +63 −63 python/plugins/db_manager/db_plugins/postgis/sql_dictionary.py
  32. +34 −34 python/plugins/db_manager/db_plugins/spatialite/connector.py
  33. +1 −1 python/plugins/db_manager/db_plugins/spatialite/data_model.py
  34. +2 −2 python/plugins/db_manager/db_plugins/spatialite/info_model.py
  35. +4 −4 python/plugins/db_manager/db_plugins/spatialite/plugin.py
  36. +19 −19 python/plugins/db_manager/db_plugins/spatialite/sql_dictionary.py
  37. +1 −1 python/plugins/db_manager/db_tree.py
  38. +1 −1 python/plugins/db_manager/dlg_add_geometry_column.py
  39. +5 −5 python/plugins/db_manager/dlg_create_constraint.py
  40. +7 −7 python/plugins/db_manager/dlg_create_index.py
  41. +40 −40 python/plugins/db_manager/dlg_create_table.py
  42. +1 −1 python/plugins/db_manager/dlg_db_error.py
  43. +3 −3 python/plugins/db_manager/dlg_field_properties.py
  44. +10 −10 python/plugins/db_manager/dlg_import_vector.py
  45. +9 −9 python/plugins/db_manager/dlg_sql_window.py
  46. +25 −25 python/plugins/db_manager/dlg_table_properties.py
  47. +5 −5 python/plugins/db_manager/highlighter.py
  48. +6 −6 python/plugins/db_manager/info_viewer.py
  49. +2 −2 python/plugins/db_manager/layer_preview.py
  50. +16 −16 python/plugins/db_manager/sql_dictionary.py
  51. +1 −1 python/plugins/db_manager/table_viewer.py
  52. +1 −1 python/plugins/fTools/tools/doGeometry.py
  53. +91 −91 python/plugins/fTools/tools/voronoi.py
  54. +19 −19 python/plugins/mapserver_export/mapserverexport.py
  55. +63 −63 python/plugins/mapserver_export/ms_export.py
  56. +2 −2 python/plugins/osm/OsmDatabaseManager.py
  57. +2 −2 python/plugins/plugin_installer/installer_plugin.py
  58. +2 −2 python/plugins/sextante/admintools/AdminToolsAlgorithmProvider.py
  59. +14 −14 python/plugins/sextante/admintools/CreateMosaicDatastore.py
  60. +5 −5 python/plugins/sextante/admintools/CreateStyleGeoServer.py
  61. +7 −7 python/plugins/sextante/admintools/CreateWorkspace.py
  62. +6 −6 python/plugins/sextante/admintools/DeleteDatastore.py
  63. +6 −6 python/plugins/sextante/admintools/DeleteWorkspace.py
  64. +8 −8 python/plugins/sextante/admintools/GeoServerToolsAlgorithm.py
  65. +11 −11 python/plugins/sextante/admintools/ImportIntoPostGIS.py
  66. +9 −9 python/plugins/sextante/admintools/ImportRasterIntoGeoServer.py
  67. +7 −7 python/plugins/sextante/admintools/ImportVectorIntoGeoServer.py
  68. +26 −26 python/plugins/sextante/admintools/PostGISExecuteSQL.py
  69. +3 −3 python/plugins/sextante/admintools/geoserver/catalog.py
  70. +2 −2 python/plugins/sextante/admintools/geoserver/layer.py
  71. +1 −1 python/plugins/sextante/admintools/geoserver/layergroup.py
  72. +2 −2 python/plugins/sextante/admintools/geoserver/resource.py
  73. +1 −1 python/plugins/sextante/admintools/geoserver/store.py
  74. +3 −3 python/plugins/sextante/admintools/geoserver/support.py
  75. +1 −1 python/plugins/sextante/admintools/geoserver/workspace.py
  76. +9 −9 python/plugins/sextante/admintools/httplib2/iri2uri.py
  77. +99 −99 python/plugins/sextante/admintools/postgis_utils.py
  78. +1 −1 python/plugins/sextante/algs/EquivalentNumField.py
  79. +1 −1 python/plugins/sextante/algs/FieldPyculator.py
  80. +9 −10 python/plugins/sextante/core/AlgorithmClassification.py
  81. +5 −5 python/plugins/sextante/core/GeoAlgorithm.py
  82. +9 −9 python/plugins/sextante/core/Sextante.py
  83. +1 −1 python/plugins/sextante/core/SextanteUtils.py
  84. +1 −1 python/plugins/sextante/ftools/PointsInPolygonUnique.py
  85. +91 −91 python/plugins/sextante/ftools/voronoi.py
  86. +2 −2 python/plugins/sextante/gdal/GdalOgrAlgorithmProvider.py
  87. +4 −4 python/plugins/sextante/gdal/gdaladdo.py
  88. +2 −2 python/plugins/sextante/gdal/merge.py
  89. +1 −1 python/plugins/sextante/gdal/ogr2ogr.py
  90. +10 −10 python/plugins/sextante/gdal/ogrinfo.py
  91. +1 −1 python/plugins/sextante/gdal/polygonize.py
  92. +5 −5 python/plugins/sextante/gdal/pyogr/ogr2ogr.py
  93. +1 −1 python/plugins/sextante/gdal/translate.py
  94. +21 −21 python/plugins/sextante/grass/GrassAlgorithm.py
  95. +3 −3 python/plugins/sextante/grass/GrassAlgorithmProvider.py
  96. +19 −19 python/plugins/sextante/grass/GrassUtils.py
  97. +4 −4 python/plugins/sextante/gui/AlgorithmExecutionDialog.py
  98. +21 −21 python/plugins/sextante/gui/BatchProcessingDialog.py
  99. +1 −1 python/plugins/sextante/gui/ExtentSelectionPanel.py
  100. +2 −2 python/plugins/sextante/gui/MultipleInputPanel.py
  101. +2 −2 python/plugins/sextante/gui/OutputSelectionPanel.py
  102. +1 −1 python/plugins/sextante/gui/ResultsDialog.py
  103. +15 −15 python/plugins/sextante/gui/SextanteToolbox.py
  104. +15 −15 python/plugins/sextante/mmqgisx/MMQGISXAlgorithmProvider.py
  105. +76 −76 python/plugins/sextante/mmqgisx/mmqgisx_library.py
  106. +3 −3 python/plugins/sextante/modeler/ModelerAlgorithm.py
  107. +6 −6 python/plugins/sextante/modeler/ModelerAlgorithmProvider.py
  108. +1 −1 python/plugins/sextante/modeler/ModelerArrowItem.py
  109. +12 −12 python/plugins/sextante/modeler/ModelerDialog.py
  110. +8 −8 python/plugins/sextante/modeler/ModelerParametersDialog.py
  111. +1 −1 python/plugins/sextante/modeler/ModelerScene.py
  112. +1 −1 python/plugins/sextante/otb/OTBAlgorithm.py
  113. +2 −2 python/plugins/sextante/otb/OTBUtils.py
  114. +66 −66 python/plugins/sextante/otb/helper/generate_application_descriptors.py
  115. +1 −1 python/plugins/sextante/parameters/ParameterFile.py
  116. +3 −3 python/plugins/sextante/parameters/ParameterFixedTable.py
  117. +1 −1 python/plugins/sextante/r/EditRScriptDialog.py
  118. +2 −2 python/plugins/sextante/r/RAlgorithmProvider.py
  119. +4 −4 python/plugins/sextante/saga/SagaAlgorithm.py
  120. +4 −4 python/plugins/sextante/saga/SagaAlgorithmProvider.py
  121. +8 −8 python/plugins/sextante/saga/SagaHelpGenerator.py
  122. +6 −6 python/plugins/sextante/saga/SplitRGBBands.py
  123. +7 −7 python/plugins/sextante/script/ScriptAlgorithm.py
  124. +7 −7 python/plugins/sextante/tests/test.py
  125. +8 −8 python/utils.py
  126. +9 −9 python/widgets_tree.py
  127. +5 −5 src/plugins/grass/scripts/db.connect-login.pg.py
  128. +1 −1 src/plugins/grass/scripts/qgis.v.kernel.rast.py
  129. +3 −3 src/plugins/grass/scripts/r.external.all.py
  130. +3 −3 src/plugins/grass/scripts/v.out.ogr.pg.py
  131. +7 −7 tests/src/python/test_qgsatlascomposition.py
  132. +5 −5 tests/src/python/test_qgscomposerlabel.py
  133. +1 −1 tests/src/python/test_qgsexpression.py
  134. +11 −11 tests/src/python/test_qgsfeature.py
@@ -64,7 +64,7 @@ def __init__(self, parent=None):
QDockWidget.__init__(self, parent)
self.setObjectName("PythonConsole")
self.setWindowTitle(QCoreApplication.translate("PythonConsole", "Python Console"))
#self.setAllowedAreas(Qt.BottomDockWidgetArea)
#self.setAllowedAreas(Qt.BottomDockWidgetArea)

self.console = PythonConsoleWidget(self)
self.setWidget( self.console )
@@ -78,26 +78,26 @@ def activate(self):
self.activateWindow()
self.raise_()
QDockWidget.setFocus(self)

def closeEvent(self, event):
self.console.edit.writeHistoryFile()
QWidget.closeEvent(self, event)

class PythonConsoleWidget(QWidget):
def __init__(self, parent=None):
QWidget.__init__(self, parent)
self.setWindowTitle(QCoreApplication.translate("PythonConsole", "Python Console"))
self.setWindowTitle(QCoreApplication.translate("PythonConsole", "Python Console"))
self.widgetButton = QWidget()
#self.widgetEditors = QWidget()

self.options = optionsDialog(self)
self.helpDlg = HelpDialog(self)

self.splitter = QSplitter(self)
self.splitter.setOrientation(Qt.Vertical)
self.splitter.setHandleWidth(3)
self.splitter.setChildrenCollapsible(False)

self.toolBar = QToolBar()
self.toolBar.setEnabled(True)
self.toolBar.setFocusPolicy(Qt.NoFocus)
@@ -263,9 +263,9 @@ def __init__(self, parent=None):
self.b.addWidget(self.toolBar)
self.edit = PythonEdit(self)
self.textEditOut = EditorOutput(self)

self.setFocusProxy(self.edit)

sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
@@ -274,10 +274,10 @@ def __init__(self, parent=None):

self.splitter.addWidget(self.textEditOut)
self.splitter.addWidget(self.edit)

sizes = self.splitter.sizes()
self.splitter.setSizes(sizes)

self.f.addWidget(self.widgetButton, 0, 0)
self.f.addWidget(self.splitter, 0, 1)

@@ -289,7 +289,7 @@ def __init__(self, parent=None):

self.textEditOut.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
self.edit.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)

self.clearButton.triggered.connect(self.textEditOut.clearConsole)
self.optionsButton.triggered.connect(self.openSettings)
self.loadIfaceButton.triggered.connect(self.iface)
@@ -300,18 +300,18 @@ def __init__(self, parent=None):
self.openFileButton.triggered.connect(self.openScriptFile)
self.saveFileButton.triggered.connect(self.saveScriptFile)
self.helpButton.triggered.connect(self.openHelp)
QObject.connect(self.options.buttonBox, SIGNAL("accepted()"),
QObject.connect(self.options.buttonBox, SIGNAL("accepted()"),
self.prefChanged)

def sextante(self):
self.edit.commandConsole('sextante')

def iface(self):
self.edit.commandConsole('iface')

def qtCore(self):
self.edit.commandConsole('qtCore')

def qtGui(self):
self.edit.commandConsole('qtGui')

@@ -354,14 +354,14 @@ def saveScriptFile(self):
sF.write('\n')
sF.write(s)
sF.close()

def openHelp(self):
self.helpDlg.show()
self.helpDlg.activateWindow()

def openSettings(self):
self.options.exec_()

def prefChanged(self):
self.edit.refreshLexerProperties()
self.textEditOut.refreshLexerProperties()
@@ -33,10 +33,10 @@ class HelpDialog(QDialog, Ui_Help):
def __init__(self, parent):
QDialog.__init__(self, parent)
self.setupUi(self)

self.setWindowTitle(QCoreApplication.translate("PythonConsole","Help Python Console"))
self.setMaximumSize(530, 300)

qgisDataDir = QgsApplication.pkgDataPath()
listFile = os.listdir(qgisDataDir + "/python/console/console_help/i18n")
localeFullName = QSettings().value( "locale/userLocale", QVariant( "" ) ).toString()
@@ -22,10 +22,10 @@
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.Qsci import (QsciScintilla,
QsciScintillaBase,
QsciScintillaBase,
QsciLexerPython)
import sys

class writeOut:
def __init__(self, edit, out=None, style=None):
"""
@@ -46,19 +46,19 @@ def write(self, m):

if self.out:
self.out.write(m)

def move_cursor_to_end(self):
"""Move cursor to end of text"""
line, index = self.get_end_pos()
self.outputArea.setCursorPosition(line, index)
self.outputArea.ensureCursorVisible()
self.outputArea.ensureLineVisible(line)

def get_end_pos(self):
"""Return (line, index) position of the last character"""
line = self.outputArea.lines() - 1
return (line, self.outputArea.text(line).length())

def flush(self):
pass

@@ -68,17 +68,17 @@ def __init__(self, parent=None):
super(EditorOutput,self).__init__(parent)
self.parent = parent
self.edit = self.parent.edit
# Enable non-ascii chars for editor

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

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

self.insertInitText()
self.setLexers()
self.setReadOnly(True)

# Set the default font
font = QFont()
font.setFamily('Courier')
@@ -102,42 +102,42 @@ def __init__(self, parent=None):
#self.setFolding(QsciScintilla.BoxedTreeFoldStyle)
#self.setFoldMarginColors(QColor("#99CC66"),QColor("#333300"))
#self.setWrapMode(QsciScintilla.WrapCharacter)

## Edge Mode
#self.setEdgeMode(QsciScintilla.EdgeLine)
#self.setEdgeColumn(80)
#self.setEdgeColor(QColor("#FF0000"))
#self.setEdgeColor(QColor("#FF0000"))

self.setWrapMode(QsciScintilla.WrapCharacter)
self.SendScintilla(QsciScintilla.SCI_SETHSCROLLBAR, 0)

self.runShortcut = QShortcut(QKeySequence(Qt.CTRL + Qt.Key_E), self)
self.runShortcut.activated.connect(self.enteredSelected)
# Reimplemeted copy action to prevent paste prompt (>>>,...) in command view
self.copyShortcut = QShortcut(QKeySequence.Copy, self)
self.copyShortcut.activated.connect(self.copy)
self.selectAllShortcut = QShortcut(QKeySequence.SelectAll, self)
self.selectAllShortcut.activated.connect(self.selectAll)

def insertInitText(self):
txtInit = QCoreApplication.translate("PythonConsole",
"## To access Quantum GIS environment from this console\n"
"## use qgis.utils.iface object (instance of QgisInterface class). Read help for more info.\n\n")
initText = self.setText(txtInit)

def refreshLexerProperties(self):
self.setLexers()

def setLexers(self):
self.lexer = QsciLexerPython()

settings = QSettings()
loadFont = settings.value("pythonConsole/fontfamilytext", "Monospace").toString()
fontSize = settings.value("pythonConsole/fontsize", 10).toInt()[0]
font = QFont(loadFont)
font.setFixedPitch(True)
font.setPointSize(fontSize)

self.lexer.setDefaultFont(font)
self.lexer.setColor(Qt.red, 1)
self.lexer.setColor(Qt.darkGreen, 5)
@@ -153,40 +153,40 @@ def getTextFromEditor(self):
text = self.text()
textList = text.split("\n")
return textList

def clearConsole(self):
#self.SendScintilla(QsciScintilla.SCI_CLEARALL)
self.setText('')
self.insertInitText()
self.edit.setFocus()
def contextMenuEvent(self, e):

def contextMenuEvent(self, e):
menu = QMenu(self)
iconRun = QIcon(":/images/console/iconRunConsole.png")
iconPastebin = QIcon(":/images/console/iconCodepadConsole.png")
iconClear = QIcon(":/images/console/iconClearConsole.png")
iconHideTool = QIcon(":/images/console/iconHideToolConsole.png")
hideToolBar = menu.addAction(iconHideTool,
"Hide/Show Toolbar",
hideToolBar = menu.addAction(iconHideTool,
"Hide/Show Toolbar",
self.hideToolBar)
menu.addSeparator()
runAction = menu.addAction(iconRun,
"Enter Selected",
self.enteredSelected,
runAction = menu.addAction(iconRun,
"Enter Selected",
self.enteredSelected,
QKeySequence(Qt.CTRL + Qt.Key_E))
clearAction = menu.addAction(iconClear,
"Clear console",
clearAction = menu.addAction(iconClear,
"Clear console",
self.clearConsole)
menu.addSeparator()
copyAction = menu.addAction("Copy",
self.copy,
copyAction = menu.addAction("Copy",
self.copy,
QKeySequence.Copy)
pastebinAction = menu.addAction(iconPastebin,
"Share on codepad",
pastebinAction = menu.addAction(iconPastebin,
"Share on codepad",
self.pastebin)
menu.addSeparator()
selectAllAction = menu.addAction("Select All",
self.selectAll,
selectAllAction = menu.addAction("Select All",
self.selectAll,
QKeySequence.SelectAll)
runAction.setEnabled(False)
clearAction.setEnabled(False)
@@ -201,12 +201,12 @@ def contextMenuEvent(self, e):
selectAllAction.setEnabled(True)
clearAction.setEnabled(True)
action = menu.exec_(self.mapToGlobal(e.pos()))

def hideToolBar(self):
tB = self.parent.toolBar
tB.hide() if tB.isVisible() else tB.show()
self.edit.setFocus()

def copy(self):
"""Copy text to clipboard... or keyboard interrupt"""
if self.hasSelectedText():
@@ -220,7 +220,7 @@ def enteredSelected(self):
cmd = self.selectedText()
self.edit.insertFromDropPaste(cmd)
self.edit.entered()

def keyPressEvent(self, e):
# empty text indicates possible shortcut key sequence so stay in output
txt = e.text()

0 comments on commit 9721736

Please sign in to comment.