Skip to content
Permalink
Browse files
Merge branch 'master' of https://github.com/qgis/Quantum-GIS
Conflicts:
	python/plugins/sextante/grass/GrassAlgorithm.py
  • Loading branch information
volaya committed Dec 11, 2012
2 parents a4186df + c84408e commit d401a6ef6e314f260032bbffaa1c52c4a1f664c8
Showing with 2,062 additions and 1,789 deletions.
  1. +6 −0 mac/xcode/src/x_qgsspatialitesourceselect.cpp
  2. +6 −0 mac/xcode/src/x_spatialite.c
  3. +6 −0 mac/xcode/src/x_sqlite3.c
  4. +17 −17 python/console/console.py
  5. +2 −2 python/console/console_help.py
  6. +38 −38 python/console/console_output.py
  7. +59 −59 python/console/console_sci.py
  8. +15 −15 python/console/console_settings.py
  9. +3 −3 python/core/qgscredentials.sip
  10. +1 −1 python/gui/qgscredentialdialog.sip
  11. +9 −9 python/plugins/GdalTools/tools/GdalTools_utils.py
  12. +2 −2 python/plugins/GdalTools/tools/doBuildVRT.py
  13. +1 −1 python/plugins/GdalTools/tools/doClipper.py
  14. +12 −12 python/plugins/GdalTools/tools/doDEM.py
  15. +3 −3 python/plugins/GdalTools/tools/doGrid.py
  16. +3 −3 python/plugins/GdalTools/tools/doMerge.py
  17. +1 −1 python/plugins/GdalTools/tools/doPolygonize.py
  18. +2 −2 python/plugins/GdalTools/tools/doRasterize.py
  19. +4 −4 python/plugins/GdalTools/tools/doSettings.py
  20. +2 −2 python/plugins/GdalTools/tools/doWarp.py
  21. +2 −2 python/plugins/GdalTools/tools/inOutSelector.py
  22. +3 −3 python/plugins/GdalTools/tools/widgetPluginBase.py
  23. +2 −2 python/plugins/db_manager/db_manager.py
  24. +1 −1 python/plugins/db_manager/db_manager_plugin.py
  25. +22 −22 python/plugins/db_manager/db_model.py
  26. +7 −7 python/plugins/db_manager/db_plugins/connector.py
  27. +6 −6 python/plugins/db_manager/db_plugins/data_model.py
  28. +15 −15 python/plugins/db_manager/db_plugins/info_model.py
  29. +12 −10 python/plugins/db_manager/db_plugins/plugin.py
  30. +99 −99 python/plugins/db_manager/db_plugins/postgis/connector.py
  31. +5 −5 python/plugins/db_manager/db_plugins/postgis/info_model.py
  32. +4 −4 python/plugins/db_manager/db_plugins/postgis/plugin.py
  33. +9 −9 python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview/__init__.py
  34. +2 −2 python/plugins/db_manager/db_plugins/postgis/plugins/versioning/__init__.py
  35. +11 −11 python/plugins/db_manager/db_plugins/postgis/plugins/versioning/dlg_versioning.py
  36. +63 −63 python/plugins/db_manager/db_plugins/postgis/sql_dictionary.py
  37. +35 −35 python/plugins/db_manager/db_plugins/spatialite/connector.py
  38. +1 −1 python/plugins/db_manager/db_plugins/spatialite/data_model.py
  39. +2 −2 python/plugins/db_manager/db_plugins/spatialite/info_model.py
  40. +4 −4 python/plugins/db_manager/db_plugins/spatialite/plugin.py
  41. +19 −19 python/plugins/db_manager/db_plugins/spatialite/sql_dictionary.py
  42. +1 −1 python/plugins/db_manager/db_tree.py
  43. +3 −3 python/plugins/db_manager/dlg_add_geometry_column.py
  44. +6 −7 python/plugins/db_manager/dlg_create_constraint.py
  45. +8 −10 python/plugins/db_manager/dlg_create_index.py
  46. +41 −42 python/plugins/db_manager/dlg_create_table.py
  47. +3 −3 python/plugins/db_manager/dlg_db_error.py
  48. +5 −5 python/plugins/db_manager/dlg_export_vector.py
  49. +4 −5 python/plugins/db_manager/dlg_field_properties.py
  50. +12 −12 python/plugins/db_manager/dlg_import_vector.py
  51. +16 −14 python/plugins/db_manager/dlg_sql_window.py
  52. +26 −27 python/plugins/db_manager/dlg_table_properties.py
  53. +5 −5 python/plugins/db_manager/highlighter.py
  54. +6 −6 python/plugins/db_manager/info_viewer.py
  55. +2 −2 python/plugins/db_manager/layer_preview.py
  56. +16 −16 python/plugins/db_manager/sql_dictionary.py
  57. +1 −1 python/plugins/db_manager/table_viewer.py
  58. +13 −13 python/plugins/db_manager/ui/DlgAddGeometryColumn.ui
  59. +3 −3 python/plugins/db_manager/ui/DlgCreateConstraint.ui
  60. +8 −4 python/plugins/db_manager/ui/DlgCreateIndex.ui
  61. +17 −13 python/plugins/db_manager/ui/DlgCreateTable.ui
  62. +4 −4 python/plugins/db_manager/ui/DlgDbError.ui
  63. +15 −5 python/plugins/db_manager/ui/DlgExportVector.ui
  64. +22 −7 python/plugins/db_manager/ui/DlgFieldProperties.ui
  65. +4 −4 python/plugins/db_manager/ui/DlgImportVector.ui
  66. +16 −3 python/plugins/db_manager/ui/DlgSqlWindow.ui
  67. +68 −67 python/plugins/db_manager/ui/DlgTableProperties.ui
  68. +1 −1 python/plugins/fTools/tools/doGeometry.py
  69. +91 −91 python/plugins/fTools/tools/voronoi.py
  70. +19 −19 python/plugins/mapserver_export/mapserverexport.py
  71. +63 −63 python/plugins/mapserver_export/ms_export.py
  72. +2 −2 python/plugins/osm/OsmDatabaseManager.py
  73. +2 −2 python/plugins/plugin_installer/installer_plugin.py
  74. +2 −2 python/plugins/sextante/admintools/AdminToolsAlgorithmProvider.py
  75. +14 −14 python/plugins/sextante/admintools/CreateMosaicDatastore.py
  76. +5 −5 python/plugins/sextante/admintools/CreateStyleGeoServer.py
  77. +7 −7 python/plugins/sextante/admintools/CreateWorkspace.py
  78. +6 −6 python/plugins/sextante/admintools/DeleteDatastore.py
  79. +6 −6 python/plugins/sextante/admintools/DeleteWorkspace.py
  80. +8 −8 python/plugins/sextante/admintools/GeoServerToolsAlgorithm.py
  81. +11 −11 python/plugins/sextante/admintools/ImportIntoPostGIS.py
  82. +9 −9 python/plugins/sextante/admintools/ImportRasterIntoGeoServer.py
  83. +7 −7 python/plugins/sextante/admintools/ImportVectorIntoGeoServer.py
  84. +26 −26 python/plugins/sextante/admintools/PostGISExecuteSQL.py
  85. +3 −3 python/plugins/sextante/admintools/geoserver/catalog.py
  86. +2 −2 python/plugins/sextante/admintools/geoserver/layer.py
  87. +1 −1 python/plugins/sextante/admintools/geoserver/layergroup.py
  88. +2 −2 python/plugins/sextante/admintools/geoserver/resource.py
  89. +1 −1 python/plugins/sextante/admintools/geoserver/store.py
  90. +3 −3 python/plugins/sextante/admintools/geoserver/support.py
  91. +1 −1 python/plugins/sextante/admintools/geoserver/workspace.py
  92. +9 −9 python/plugins/sextante/admintools/httplib2/iri2uri.py
  93. +99 −99 python/plugins/sextante/admintools/postgis_utils.py
  94. +1 −1 python/plugins/sextante/algs/EquivalentNumField.py
  95. +1 −1 python/plugins/sextante/algs/FieldPyculator.py
  96. +9 −10 python/plugins/sextante/core/AlgorithmClassification.py
  97. +5 −5 python/plugins/sextante/core/GeoAlgorithm.py
  98. +9 −9 python/plugins/sextante/core/Sextante.py
  99. +1 −1 python/plugins/sextante/core/SextanteUtils.py
  100. +1 −1 python/plugins/sextante/ftools/PointsInPolygonUnique.py
  101. +91 −91 python/plugins/sextante/ftools/voronoi.py
  102. +2 −2 python/plugins/sextante/gdal/GdalOgrAlgorithmProvider.py
  103. +4 −4 python/plugins/sextante/gdal/gdaladdo.py
  104. +2 −2 python/plugins/sextante/gdal/merge.py
  105. +1 −1 python/plugins/sextante/gdal/ogr2ogr.py
  106. +10 −10 python/plugins/sextante/gdal/ogrinfo.py
  107. +1 −1 python/plugins/sextante/gdal/polygonize.py
  108. +5 −5 python/plugins/sextante/gdal/pyogr/ogr2ogr.py
  109. +1 −1 python/plugins/sextante/gdal/translate.py
  110. +23 −25 python/plugins/sextante/grass/GrassAlgorithm.py
  111. +3 −3 python/plugins/sextante/grass/GrassAlgorithmProvider.py
  112. +19 −19 python/plugins/sextante/grass/GrassUtils.py
  113. +4 −4 python/plugins/sextante/gui/AlgorithmExecutionDialog.py
  114. +21 −21 python/plugins/sextante/gui/BatchProcessingDialog.py
  115. +1 −1 python/plugins/sextante/gui/ConfigDialog.py
  116. +1 −1 python/plugins/sextante/gui/ExtentSelectionPanel.py
  117. +2 −2 python/plugins/sextante/gui/MultipleInputPanel.py
  118. +2 −2 python/plugins/sextante/gui/OutputSelectionPanel.py
  119. +1 −1 python/plugins/sextante/gui/ResultsDialog.py
  120. +15 −15 python/plugins/sextante/gui/SextanteToolbox.py
  121. +15 −15 python/plugins/sextante/mmqgisx/MMQGISXAlgorithmProvider.py
  122. +76 −76 python/plugins/sextante/mmqgisx/mmqgisx_library.py
  123. +3 −3 python/plugins/sextante/modeler/ModelerAlgorithm.py
  124. +6 −6 python/plugins/sextante/modeler/ModelerAlgorithmProvider.py
  125. +1 −1 python/plugins/sextante/modeler/ModelerArrowItem.py
  126. +12 −12 python/plugins/sextante/modeler/ModelerDialog.py
  127. +8 −8 python/plugins/sextante/modeler/ModelerParametersDialog.py
  128. +1 −1 python/plugins/sextante/modeler/ModelerScene.py
  129. +1 −1 python/plugins/sextante/otb/OTBAlgorithm.py
  130. +2 −2 python/plugins/sextante/otb/OTBUtils.py
  131. +66 −66 python/plugins/sextante/otb/helper/generate_application_descriptors.py
  132. +1 −1 python/plugins/sextante/parameters/ParameterFile.py
  133. +3 −3 python/plugins/sextante/parameters/ParameterFixedTable.py
  134. +1 −1 python/plugins/sextante/r/EditRScriptDialog.py
  135. +2 −2 python/plugins/sextante/r/RAlgorithmProvider.py
  136. +4 −4 python/plugins/sextante/saga/SagaAlgorithm.py
  137. +4 −4 python/plugins/sextante/saga/SagaAlgorithmProvider.py
  138. +8 −8 python/plugins/sextante/saga/SagaHelpGenerator.py
  139. +6 −6 python/plugins/sextante/saga/SplitRGBBands.py
  140. +7 −7 python/plugins/sextante/script/ScriptAlgorithm.py
  141. +7 −7 python/plugins/sextante/tests/test.py
  142. +8 −8 python/utils.py
  143. +9 −9 python/widgets_tree.py
  144. +1 −0 qgis.dtd
  145. +15 −0 src/app/composer/qgscomposer.cpp
  146. +4 −0 src/app/composer/qgscomposer.h
  147. +5 −0 src/app/composer/qgscomposermanager.cpp
  148. +4 −2 src/app/qgsattributedialog.cpp
  149. +1 −1 src/app/qgsmaptooloffsetcurve.cpp
  150. +14 −0 src/app/qgssvgannotationitemdialog.h
  151. +1 −0 src/core/pal/rtree.hpp
  152. +1 −1 src/core/qgspallabeling.cpp
  153. +1 −0 src/core/spatialite/headers/spatialite/sqlite3.h
  154. +1 −0 src/core/spatialite/headers/spatialite/sqlite3ext.h
  155. +1 −0 src/core/spatialite/sqlite3.c
  156. +7 −3 src/gui/symbology-ng/characterwidget.cpp
  157. +5 −0 src/gui/symbology-ng/characterwidget.h
  158. +3 −1 src/plugins/dxf2shp_converter/dxflib/confdefs.h
  159. +4 −0 src/plugins/dxf2shp_converter/dxflib/src/dl_attributes.h
  160. +4 −0 src/plugins/dxf2shp_converter/dxflib/src/dl_codes.h
  161. +4 −0 src/plugins/dxf2shp_converter/dxflib/src/dl_creationadapter.h
  162. +4 −0 src/plugins/dxf2shp_converter/dxflib/src/dl_creationinterface.h
  163. +4 −0 src/plugins/dxf2shp_converter/dxflib/src/dl_dxf.cpp
  164. +4 −0 src/plugins/dxf2shp_converter/dxflib/src/dl_dxf.h
  165. +4 −0 src/plugins/dxf2shp_converter/dxflib/src/dl_entities.h
  166. +4 −0 src/plugins/dxf2shp_converter/dxflib/src/dl_exception.h
  167. +4 −0 src/plugins/dxf2shp_converter/dxflib/src/dl_extrusion.h
  168. +4 −0 src/plugins/dxf2shp_converter/dxflib/src/dl_writer.h
  169. +4 −0 src/plugins/dxf2shp_converter/dxflib/src/dl_writer_ascii.cpp
  170. +4 −0 src/plugins/dxf2shp_converter/dxflib/src/dl_writer_ascii.h
  171. +38 −21 src/plugins/grass/qgsgrassmodule.cpp
  172. +6 −0 src/plugins/grass/qgsgrassmodule.h
  173. +5 −5 src/plugins/grass/qgsgrasstoolsbase.ui
  174. +5 −5 src/plugins/grass/scripts/db.connect-login.pg.py
  175. +1 −1 src/plugins/grass/scripts/qgis.v.kernel.rast.py
  176. +3 −3 src/plugins/grass/scripts/r.external.all.py
  177. +3 −3 src/plugins/grass/scripts/v.out.ogr.pg.py
  178. +114 −36 src/providers/grass/CMakeLists.txt
  179. +21 −12 src/providers/grass/qgsgrassgislib.cpp
  180. +2 −3 src/providers/grass/qgsgrassgislib.h
  181. +7 −7 tests/src/python/test_qgsatlascomposition.py
  182. +5 −5 tests/src/python/test_qgscomposerlabel.py
  183. +1 −1 tests/src/python/test_qgsexpression.py
  184. +11 −11 tests/src/python/test_qgsfeature.py
@@ -1,3 +1,9 @@
/*
* This file is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#if !SQLITE_QSYSTEM

#include "../../src/app/qgsspatialitesourceselect.cpp"
@@ -1,3 +1,9 @@
/*
* This file is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#if SQLITE_QINTERNAL

#include "../../src/core/spatialite/spatialite.c"
@@ -1,3 +1,9 @@
/*
* This file is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#if SQLITE_QINTERNAL

#include "../../src/core/spatialite/sqlite3.c"
@@ -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 d401a6e

Please sign in to comment.