Skip to content
Permalink
Browse files

Merge branch 'master' into delimited_text_indexing_implemented

  • Loading branch information
ccrook committed May 12, 2013
2 parents 799870d + 9dd8b2f commit 1f7f2b34d4bb8384a0ad9789f5c006f545027d5b
Showing with 4,421 additions and 3,692 deletions.
  1. +22 −22 doc/TRANSLATORS
  2. +559 −510 i18n/qgis_de.ts
  3. +2,869 −2,151 i18n/qgis_gl_ES.ts
  4. +1 −0 images/images.qrc
  5. BIN images/themes/default/console/iconSyntaxErrorConsole.png
  6. +8 −2 python/console/console.py
  7. +163 −74 python/console/console_editor.py
  8. +2 −1 python/console/console_output.py
  9. +9 −0 python/console/console_sci.py
  10. +3 −2 python/plugins/fTools/tools/doSubsetSelect.py
  11. +1 −1 python/plugins/sextante/algs/ftools/RandomSelection.py
  12. +1 −1 python/plugins/sextante/algs/ftools/RandomSelectionWithinSubsets.py
  13. +2 −0 resources/function_help/Conditionals-en_US
  14. +14 −0 resources/function_help/format-en_US
  15. +174 −0 resources/function_help/format_date-en_US
  16. 0 resources/function_help/{title_en_US → title-en_US}
  17. +13 −0 resources/function_help/todate-en_US
  18. +13 −0 resources/function_help/todatetime-en_US
  19. +13 −0 resources/function_help/tointerval-en_US
  20. +13 −0 resources/function_help/totime-en_US
  21. +0 −12 src/app/composer/qgscomposermapwidget.cpp
  22. +0 −1 src/app/composer/qgscomposermapwidget.h
  23. +29 −21 src/app/qgisapp.cpp
  24. +256 −697 src/app/qgscustomprojectiondialog.cpp
  25. +30 −33 src/app/qgscustomprojectiondialog.h
  26. +18 −1 src/app/qgshandlebadlayers.cpp
  27. +2 −0 src/app/qgshandlebadlayers.h
  28. +2 −0 src/app/qgsoptions.cpp
  29. +24 −2 src/core/qgscoordinatereferencesystem.cpp
  30. +2 −2 src/core/qgscoordinatereferencesystem.h
  31. +11 −0 src/core/raster/qgsrasterfilewriter.h
  32. +4 −13 src/gui/qgsprojectionselector.cpp
  33. +10 −1 src/providers/oracle/qgsoraclecolumntypethread.cpp
  34. +2 −0 src/providers/oracle/qgsoraclecolumntypethread.h
  35. +3 −2 src/providers/oracle/qgsoracleconn.cpp
  36. +6 −2 src/providers/oracle/qgsoraclesourceselect.cpp
  37. +2 −0 src/providers/oracle/qgsoraclesourceselect.h
  38. +3 −0 src/providers/postgres/qgscolumntypethread.cpp
  39. +2 −0 src/providers/postgres/qgscolumntypethread.h
  40. +9 −0 src/providers/postgres/qgspgsourceselect.cpp
  41. +2 −0 src/providers/postgres/qgspgsourceselect.h
  42. +1 −1 src/providers/wcs/qgswcsprovider.cpp
  43. +114 −138 src/ui/qgscustomprojectiondialogbase.ui
  44. +7 −0 src/ui/qgsoptionsbase.ui
  45. +2 −2 src/ui/qgsprojectionselectorbase.ui

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -102,6 +102,7 @@
<file>themes/default/console/iconSearchEditorConsole.png</file>
<file>themes/default/console/iconSearchNextEditorConsole.png</file>
<file>themes/default/console/iconSearchPrevEditorConsole.png</file>
<file>themes/default/console/iconSyntaxErrorConsole.png</file>
<file>themes/default/extents.png</file>
<file>themes/default/favourites.png</file>
<file>themes/default/geographic.png</file>
Binary file not shown.
@@ -160,7 +160,7 @@ def __init__(self, parent=None):
saveFileBt = QCoreApplication.translate("PythonConsole", "Save")
self.saveFileButton = QAction(self)
self.saveFileButton.setCheckable(False)
self.saveFileButton.setEnabled(True)
self.saveFileButton.setEnabled(False)
self.saveFileButton.setIcon(QgsApplication.getThemeIcon("console/iconSaveConsole.png"))
self.saveFileButton.setMenuRole(QAction.PreferencesRole)
self.saveFileButton.setIconVisibleInMenu(True)
@@ -537,14 +537,20 @@ def _textFindChanged(self):
self.findPrevButton.setEnabled(False)

def onClickGoToLine(self, item, column):
tabEditor = self.tabEditorWidget.currentWidget().newEditor
if item.text(1) == 'syntaxError':
check = self.tabEditorWidget.currentWidget().newEditor.syntaxCheck(fromContextMenu=False)
if check and not tabEditor.isReadOnly():
self.tabEditorWidget.currentWidget().save()
return
linenr = int(item.text(1))
itemName = str(item.text(0))
charPos = itemName.find(' ')
if charPos != -1:
objName = itemName[0:charPos]
else:
objName = itemName
self.tabEditorWidget.currentWidget().newEditor.goToLine(objName, linenr)
tabEditor.goToLine(objName, linenr)

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

Large diffs are not rendered by default.

@@ -47,11 +47,12 @@ def write(self, m):
self.sO.SendScintilla(QsciScintilla.SCI_SETSTYLING, len(m), 1)
else:
self.sO.append(m)
self.move_cursor_to_end()

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

self.move_cursor_to_end()

def move_cursor_to_end(self):
"""Move cursor to end of text"""
line, index = self.get_end_pos()
@@ -43,6 +43,9 @@ def __init__(self, parent=None):

self.parent = parent

self.opening = ['(', '{', '[', "'", '"']
self.closing = [')', '}', ']', "'", '"']

self.settings = QSettings()

# Enable non-ascii chars for editor
@@ -69,6 +72,7 @@ def __init__(self, parent=None):
# Brace matching: enable for a brace immediately before or after
# the current position
self.setBraceMatching(QsciScintilla.SloppyBraceMatch)
self.setMatchedBraceBackgroundColor(QColor("#c6c6c6"))

# Current line visible with special background color
self.setCaretWidth(2)
@@ -387,6 +391,11 @@ def keyPressEvent(self, e):
self.showNext()
## TODO: press event for auto-completion file directory
else:
t = unicode(e.text())
## Close bracket automatically
if t in self.opening:
i = self.opening.index(t)
self.insert(self.closing[i])
QsciScintilla.keyPressEvent(self, e)

def contextMenuEvent(self, e):
@@ -81,8 +81,9 @@ def accept(self):

def compute(self, inVect, inField, value, perc, progressBar):
mlayer = ftools_utils.getMapLayerByName(inVect)
mlayer.removeSelection(True)
mlayer.removeSelection()
vlayer = ftools_utils.getVectorLayerByName(inVect)
vprovider = vlayer.dataProvider()
index = vprovider.fieldNameIndex(inField)
#unique = []
#vprovider.uniqueValues(index, unique)
@@ -93,7 +94,7 @@ def compute(self, inVect, inField, value, perc, progressBar):
nElement = 0
self.progressBar.setValue(0)
self.progressBar.setRange(0, nFeat)
fit = vprovider.getFeatures()
fit = vprovider.getFeatures()
if not len(unique) == mlayer.featureCount():
for i in unique:
fit.rewind()
@@ -72,7 +72,7 @@ def processAlgorithm(self, progress):
featureCount = layer.featureCount()
value = int(self.getParameterValue(self.NUMBER))

layer.removeSelection(True)
layer.removeSelection()

if method == 0:
if value > featureCount:
@@ -72,7 +72,7 @@ def processAlgorithm(self, progress):
field = self.getParameterValue(self.FIELD)
method = self.getParameterValue(self.METHOD)

layer.removeSelection(True)
layer.removeSelection()
index = layer.fieldNameIndex(field)

unique = utils.getUniqueValues(layer, index)
@@ -0,0 +1,2 @@
<h3>Conditionals Group</h3>
This group contains functions to handle conditional checks in expressions.
@@ -0,0 +1,14 @@
<h3>format() function</h3>
Format a string using supplied arguments.

<h4>Syntax</h4>
<code>format('string', arg, [arg...n])</code><br>

<h4>Arguments</h4>
<code>string</code> - is string. String with Qt QString place holders. Use %1, %2, etc for placeholders. Placeholders can be repeated.
<br>
<code>arg [arg...n]</code> - any type. Any number of args.

<h4>Example</h4>
<!-- Show example of function.-->
<code>format('This %1 a %2','is', 'test') &rarr; This is a test</code><br>
@@ -0,0 +1,174 @@
<h3>format_date() function</h3>
Format a date type or string into a custom string format. Uses Qt data time format strings. See <a href='http://qt-project.org/doc/qt-4.8/qdatetime.html#toString'>QDateTime::toString</a>

<h4>Syntax</h4>
<code>format_date('string', 'format_string')</code><br>

<h4>Arguments</h4>
<code>string</code> - is string. Date/Time/DateTime string.
<br>
<code>format_string</code> - is string. String template used to format the string.

<table>
<thead>
<tr>
<th>Expression</th>

<th>Output</th>
</tr>
</thead>

<tr valign="top">
<td>d</td>

<td>the day as number without a leading zero (1 to 31)</td>
</tr>

<tr valign="top">
<td>dd</td>

<td>the day as number with a leading zero (01 to 31)</td>
</tr>

<tr valign="top">
<td>ddd</td>

<td>the abbreviated localized day name (e.g. 'Mon' to 'Sun'). Uses <a href=
"qdate.html#shortDayName">QDate::shortDayName</a>().</td>
</tr>

<tr valign="top">
<td>dddd</td>

<td>the long localized day name (e.g. 'Monday' to 'Sunday'). Uses <a href=
"qdate.html#longDayName">QDate::longDayName</a>().</td>
</tr>

<tr valign="top">
<td>M</td>

<td>the month as number without a leading zero (1-12)</td>
</tr>

<tr valign="top">
<td>MM</td>

<td>the month as number with a leading zero (01-12)</td>
</tr>

<tr valign="top">
<td>MMM</td>

<td>the abbreviated localized month name (e.g. 'Jan' to 'Dec'). Uses <a href=
"qdate.html#shortMonthName">QDate::shortMonthName</a>().</td>
</tr>

<tr valign="top">
<td>MMMM</td>

<td>the long localized month name (e.g. 'January' to 'December'). Uses <a href=
"qdate.html#longMonthName">QDate::longMonthName</a>().</td>
</tr>

<tr valign="top">
<td>yy</td>

<td>the year as two digit number (00-99)</td>
</tr>

<tr valign="top">
<td>yyyy</td>

<td>the year as four digit number</td>
</tr>
</table>

<p>These expressions may be used for the time part of the format string:</p>

<table>
<thead>
<tr>
<th>Expression</th>

<th>Output</th>
</tr>
</thead>

<tr valign="top">
<td>h</td>

<td>the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</td>
</tr>

<tr valign="top">
<td>hh</td>

<td>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</td>
</tr>

<tr valign="top">
<td>H</td>

<td>the hour without a leading zero (0 to 23, even with AM/PM display)</td>
</tr>

<tr valign="top">
<td>HH</td>

<td>the hour with a leading zero (00 to 23, even with AM/PM display)</td>
</tr>

<tr valign="top">
<td>m</td>

<td>the minute without a leading zero (0 to 59)</td>
</tr>

<tr valign="top">
<td>mm</td>

<td>the minute with a leading zero (00 to 59)</td>
</tr>

<tr valign="top">
<td>s</td>

<td>the second without a leading zero (0 to 59)</td>
</tr>

<tr valign="top">
<td>ss</td>

<td>the second with a leading zero (00 to 59)</td>
</tr>

<tr valign="top">
<td>z</td>

<td>the milliseconds without leading zeroes (0 to 999)</td>
</tr>

<tr valign="top">
<td>zzz</td>

<td>the milliseconds with leading zeroes (000 to 999)</td>
</tr>

<tr valign="top">
<td>AP or A</td>

<td>interpret as an AM/PM time. <i>AP</i> must be either "AM" or "PM".</td>
</tr>

<tr valign="top">
<td>ap or a</td>

<td>Interpret as an AM/PM time. <i>ap</i> must be either "am" or "pm".</td>
</tr>
</table>

<br>

<h4>Example</h4>
<!-- Show example of function.-->
<code>format_date('2012-05-15','dd.mm.yyyy') &rarr; 15.00.2012</code><br>
File renamed without changes.
@@ -0,0 +1,13 @@
<h3>todate() function</h3>
Convert a string into Qt data type.

<h4>Syntax</h4>
<code>todate('string')</code><br>

<h4>Arguments</h4>
<code>string</code> - is string in Qt date format.
<br>

<h4>Example</h4>
<!-- Show example of function.-->
<code>todate('2012-05-04') &rarr; 2012-05-04</code><br>
@@ -0,0 +1,13 @@
<h3>todatetime() function</h3>
Convert a string into Qt data time type.

<h4>Syntax</h4>
<code>todatetime('string')</code><br>

<h4>Arguments</h4>
<code>string</code> - is string in Qt date time format.
<br>

<h4>Example</h4>
<!-- Show example of function.-->
<code>todatetime('2012-05-04 12:50:00') &rarr; 2012-05-04T12:50:00</code><br>
@@ -0,0 +1,13 @@
<h3>tointerval() function</h3>
Converts a string to a interval type. Can be used to take days, hours, month, etc off a date.

<h4>Syntax</h4>
<code>tointerval('string')</code><br>

<h4>Arguments</h4>
<code>string</code> - is string. Format {n} days {n} hours {n} months
<br>

<h4>Example</h4>
<!-- Show example of function.-->
<code>todatetime('2012-05-05 12:00:00') - tointerval('1 day 2 hours') &rarr; 2012-05-04T10:00:00</code><br>
@@ -0,0 +1,13 @@
<h3>totime() function</h3>
Convert a string into Qt time type.

<h4>Syntax</h4>
<code>totime('string')</code><br>

<h4>Arguments</h4>
<code>string</code> - is string in Qt time format.
<br>

<h4>Example</h4>
<!-- Show example of function.-->
<code>totime('12:30:01') &rarr; 12:30:01</code><br>
@@ -656,18 +656,6 @@ void QgsComposerMapWidget::on_mOffsetYSpinBox_editingFinished()
mComposerMap->endCommand();
}

void QgsComposerMapWidget::on_mLineWidthSpinBox_valueChanged( double d )
{
if ( !mComposerMap )
{
return;
}
mComposerMap->beginCommand( tr( "Grid pen changed" ) );
mComposerMap->setGridPenWidth( d );
mComposerMap->update();
mComposerMap->endCommand();
}

void QgsComposerMapWidget::on_mGridLineStyleButton_clicked()
{
if ( !mComposerMap )

0 comments on commit 1f7f2b3

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