Skip to content

Commit d401a6e

Browse files
committed
Merge branch 'master' of https://github.com/qgis/Quantum-GIS
Conflicts: python/plugins/sextante/grass/GrassAlgorithm.py
2 parents a4186df + c84408e commit d401a6e

File tree

184 files changed

+2062
-1789
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+2062
-1789
lines changed

mac/xcode/src/x_qgsspatialitesourceselect.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* This file is free software: you can redistribute it and/or modify
3+
* it under the terms of the GNU General Public License as published by
4+
* the Free Software Foundation, either version 3 of the License, or
5+
* (at your option) any later version.
6+
*/
17
#if !SQLITE_QSYSTEM
28

39
#include "../../src/app/qgsspatialitesourceselect.cpp"

mac/xcode/src/x_spatialite.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* This file is free software: you can redistribute it and/or modify
3+
* it under the terms of the GNU General Public License as published by
4+
* the Free Software Foundation, either version 3 of the License, or
5+
* (at your option) any later version.
6+
*/
17
#if SQLITE_QINTERNAL
28

39
#include "../../src/core/spatialite/spatialite.c"

mac/xcode/src/x_sqlite3.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* This file is free software: you can redistribute it and/or modify
3+
* it under the terms of the GNU General Public License as published by
4+
* the Free Software Foundation, either version 3 of the License, or
5+
* (at your option) any later version.
6+
*/
17
#if SQLITE_QINTERNAL
28

39
#include "../../src/core/spatialite/sqlite3.c"

python/console/console.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __init__(self, parent=None):
6464
QDockWidget.__init__(self, parent)
6565
self.setObjectName("PythonConsole")
6666
self.setWindowTitle(QCoreApplication.translate("PythonConsole", "Python Console"))
67-
#self.setAllowedAreas(Qt.BottomDockWidgetArea)
67+
#self.setAllowedAreas(Qt.BottomDockWidgetArea)
6868

6969
self.console = PythonConsoleWidget(self)
7070
self.setWidget( self.console )
@@ -78,26 +78,26 @@ def activate(self):
7878
self.activateWindow()
7979
self.raise_()
8080
QDockWidget.setFocus(self)
81-
81+
8282
def closeEvent(self, event):
8383
self.console.edit.writeHistoryFile()
8484
QWidget.closeEvent(self, event)
8585

8686
class PythonConsoleWidget(QWidget):
8787
def __init__(self, parent=None):
8888
QWidget.__init__(self, parent)
89-
self.setWindowTitle(QCoreApplication.translate("PythonConsole", "Python Console"))
89+
self.setWindowTitle(QCoreApplication.translate("PythonConsole", "Python Console"))
9090
self.widgetButton = QWidget()
9191
#self.widgetEditors = QWidget()
92-
92+
9393
self.options = optionsDialog(self)
9494
self.helpDlg = HelpDialog(self)
95-
95+
9696
self.splitter = QSplitter(self)
9797
self.splitter.setOrientation(Qt.Vertical)
9898
self.splitter.setHandleWidth(3)
9999
self.splitter.setChildrenCollapsible(False)
100-
100+
101101
self.toolBar = QToolBar()
102102
self.toolBar.setEnabled(True)
103103
self.toolBar.setFocusPolicy(Qt.NoFocus)
@@ -263,9 +263,9 @@ def __init__(self, parent=None):
263263
self.b.addWidget(self.toolBar)
264264
self.edit = PythonEdit(self)
265265
self.textEditOut = EditorOutput(self)
266-
266+
267267
self.setFocusProxy(self.edit)
268-
268+
269269
sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Preferred)
270270
sizePolicy.setHorizontalStretch(0)
271271
sizePolicy.setVerticalStretch(0)
@@ -274,10 +274,10 @@ def __init__(self, parent=None):
274274

275275
self.splitter.addWidget(self.textEditOut)
276276
self.splitter.addWidget(self.edit)
277-
277+
278278
sizes = self.splitter.sizes()
279279
self.splitter.setSizes(sizes)
280-
280+
281281
self.f.addWidget(self.widgetButton, 0, 0)
282282
self.f.addWidget(self.splitter, 0, 1)
283283

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

290290
self.textEditOut.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
291291
self.edit.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
292-
292+
293293
self.clearButton.triggered.connect(self.textEditOut.clearConsole)
294294
self.optionsButton.triggered.connect(self.openSettings)
295295
self.loadIfaceButton.triggered.connect(self.iface)
@@ -300,18 +300,18 @@ def __init__(self, parent=None):
300300
self.openFileButton.triggered.connect(self.openScriptFile)
301301
self.saveFileButton.triggered.connect(self.saveScriptFile)
302302
self.helpButton.triggered.connect(self.openHelp)
303-
QObject.connect(self.options.buttonBox, SIGNAL("accepted()"),
303+
QObject.connect(self.options.buttonBox, SIGNAL("accepted()"),
304304
self.prefChanged)
305305

306306
def sextante(self):
307307
self.edit.commandConsole('sextante')
308308

309309
def iface(self):
310310
self.edit.commandConsole('iface')
311-
311+
312312
def qtCore(self):
313313
self.edit.commandConsole('qtCore')
314-
314+
315315
def qtGui(self):
316316
self.edit.commandConsole('qtGui')
317317

@@ -354,14 +354,14 @@ def saveScriptFile(self):
354354
sF.write('\n')
355355
sF.write(s)
356356
sF.close()
357-
357+
358358
def openHelp(self):
359359
self.helpDlg.show()
360360
self.helpDlg.activateWindow()
361-
361+
362362
def openSettings(self):
363363
self.options.exec_()
364-
364+
365365
def prefChanged(self):
366366
self.edit.refreshLexerProperties()
367367
self.textEditOut.refreshLexerProperties()

python/console/console_help.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ class HelpDialog(QDialog, Ui_Help):
3333
def __init__(self, parent):
3434
QDialog.__init__(self, parent)
3535
self.setupUi(self)
36-
36+
3737
self.setWindowTitle(QCoreApplication.translate("PythonConsole","Help Python Console"))
3838
self.setMaximumSize(530, 300)
39-
39+
4040
qgisDataDir = QgsApplication.pkgDataPath()
4141
listFile = os.listdir(qgisDataDir + "/python/console/console_help/i18n")
4242
localeFullName = QSettings().value( "locale/userLocale", QVariant( "" ) ).toString()

python/console/console_output.py

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
from PyQt4.QtCore import *
2323
from PyQt4.QtGui import *
2424
from PyQt4.Qsci import (QsciScintilla,
25-
QsciScintillaBase,
25+
QsciScintillaBase,
2626
QsciLexerPython)
2727
import sys
28-
28+
2929
class writeOut:
3030
def __init__(self, edit, out=None, style=None):
3131
"""
@@ -46,19 +46,19 @@ def write(self, m):
4646

4747
if self.out:
4848
self.out.write(m)
49-
49+
5050
def move_cursor_to_end(self):
5151
"""Move cursor to end of text"""
5252
line, index = self.get_end_pos()
5353
self.outputArea.setCursorPosition(line, index)
5454
self.outputArea.ensureCursorVisible()
5555
self.outputArea.ensureLineVisible(line)
56-
56+
5757
def get_end_pos(self):
5858
"""Return (line, index) position of the last character"""
5959
line = self.outputArea.lines() - 1
6060
return (line, self.outputArea.text(line).length())
61-
61+
6262
def flush(self):
6363
pass
6464

@@ -68,17 +68,17 @@ def __init__(self, parent=None):
6868
super(EditorOutput,self).__init__(parent)
6969
self.parent = parent
7070
self.edit = self.parent.edit
71-
72-
# Enable non-ascii chars for editor
71+
72+
# Enable non-ascii chars for editor
7373
self.setUtf8(True)
74-
74+
7575
sys.stdout = writeOut(self, sys.stdout)
7676
sys.stderr = writeOut(self, sys.stderr, "traceback")
77-
77+
7878
self.insertInitText()
7979
self.setLexers()
8080
self.setReadOnly(True)
81-
81+
8282
# Set the default font
8383
font = QFont()
8484
font.setFamily('Courier')
@@ -102,42 +102,42 @@ def __init__(self, parent=None):
102102
#self.setFolding(QsciScintilla.BoxedTreeFoldStyle)
103103
#self.setFoldMarginColors(QColor("#99CC66"),QColor("#333300"))
104104
#self.setWrapMode(QsciScintilla.WrapCharacter)
105-
105+
106106
## Edge Mode
107107
#self.setEdgeMode(QsciScintilla.EdgeLine)
108108
#self.setEdgeColumn(80)
109-
#self.setEdgeColor(QColor("#FF0000"))
110-
109+
#self.setEdgeColor(QColor("#FF0000"))
110+
111111
self.setWrapMode(QsciScintilla.WrapCharacter)
112112
self.SendScintilla(QsciScintilla.SCI_SETHSCROLLBAR, 0)
113-
113+
114114
self.runShortcut = QShortcut(QKeySequence(Qt.CTRL + Qt.Key_E), self)
115115
self.runShortcut.activated.connect(self.enteredSelected)
116116
# Reimplemeted copy action to prevent paste prompt (>>>,...) in command view
117117
self.copyShortcut = QShortcut(QKeySequence.Copy, self)
118118
self.copyShortcut.activated.connect(self.copy)
119119
self.selectAllShortcut = QShortcut(QKeySequence.SelectAll, self)
120120
self.selectAllShortcut.activated.connect(self.selectAll)
121-
121+
122122
def insertInitText(self):
123123
txtInit = QCoreApplication.translate("PythonConsole",
124124
"## To access Quantum GIS environment from this console\n"
125125
"## use qgis.utils.iface object (instance of QgisInterface class). Read help for more info.\n\n")
126126
initText = self.setText(txtInit)
127-
127+
128128
def refreshLexerProperties(self):
129129
self.setLexers()
130-
130+
131131
def setLexers(self):
132132
self.lexer = QsciLexerPython()
133-
133+
134134
settings = QSettings()
135135
loadFont = settings.value("pythonConsole/fontfamilytext", "Monospace").toString()
136136
fontSize = settings.value("pythonConsole/fontsize", 10).toInt()[0]
137137
font = QFont(loadFont)
138138
font.setFixedPitch(True)
139139
font.setPointSize(fontSize)
140-
140+
141141
self.lexer.setDefaultFont(font)
142142
self.lexer.setColor(Qt.red, 1)
143143
self.lexer.setColor(Qt.darkGreen, 5)
@@ -153,40 +153,40 @@ def getTextFromEditor(self):
153153
text = self.text()
154154
textList = text.split("\n")
155155
return textList
156-
156+
157157
def clearConsole(self):
158158
#self.SendScintilla(QsciScintilla.SCI_CLEARALL)
159159
self.setText('')
160160
self.insertInitText()
161161
self.edit.setFocus()
162-
163-
def contextMenuEvent(self, e):
162+
163+
def contextMenuEvent(self, e):
164164
menu = QMenu(self)
165165
iconRun = QIcon(":/images/console/iconRunConsole.png")
166166
iconPastebin = QIcon(":/images/console/iconCodepadConsole.png")
167167
iconClear = QIcon(":/images/console/iconClearConsole.png")
168168
iconHideTool = QIcon(":/images/console/iconHideToolConsole.png")
169-
hideToolBar = menu.addAction(iconHideTool,
170-
"Hide/Show Toolbar",
169+
hideToolBar = menu.addAction(iconHideTool,
170+
"Hide/Show Toolbar",
171171
self.hideToolBar)
172172
menu.addSeparator()
173-
runAction = menu.addAction(iconRun,
174-
"Enter Selected",
175-
self.enteredSelected,
173+
runAction = menu.addAction(iconRun,
174+
"Enter Selected",
175+
self.enteredSelected,
176176
QKeySequence(Qt.CTRL + Qt.Key_E))
177-
clearAction = menu.addAction(iconClear,
178-
"Clear console",
177+
clearAction = menu.addAction(iconClear,
178+
"Clear console",
179179
self.clearConsole)
180180
menu.addSeparator()
181-
copyAction = menu.addAction("Copy",
182-
self.copy,
181+
copyAction = menu.addAction("Copy",
182+
self.copy,
183183
QKeySequence.Copy)
184-
pastebinAction = menu.addAction(iconPastebin,
185-
"Share on codepad",
184+
pastebinAction = menu.addAction(iconPastebin,
185+
"Share on codepad",
186186
self.pastebin)
187187
menu.addSeparator()
188-
selectAllAction = menu.addAction("Select All",
189-
self.selectAll,
188+
selectAllAction = menu.addAction("Select All",
189+
self.selectAll,
190190
QKeySequence.SelectAll)
191191
runAction.setEnabled(False)
192192
clearAction.setEnabled(False)
@@ -201,12 +201,12 @@ def contextMenuEvent(self, e):
201201
selectAllAction.setEnabled(True)
202202
clearAction.setEnabled(True)
203203
action = menu.exec_(self.mapToGlobal(e.pos()))
204-
204+
205205
def hideToolBar(self):
206206
tB = self.parent.toolBar
207207
tB.hide() if tB.isVisible() else tB.show()
208208
self.edit.setFocus()
209-
209+
210210
def copy(self):
211211
"""Copy text to clipboard... or keyboard interrupt"""
212212
if self.hasSelectedText():
@@ -220,7 +220,7 @@ def enteredSelected(self):
220220
cmd = self.selectedText()
221221
self.edit.insertFromDropPaste(cmd)
222222
self.edit.entered()
223-
223+
224224
def keyPressEvent(self, e):
225225
# empty text indicates possible shortcut key sequence so stay in output
226226
txt = e.text()

0 commit comments

Comments
 (0)