Skip to content

Commit c884e15

Browse files
committed
Merge pull request #2 from qgis/master
Forked source update request
2 parents 637dca7 + 6c21262 commit c884e15

File tree

124 files changed

+1851
-1795
lines changed

Some content is hidden

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

124 files changed

+1851
-1795
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ IF (PEDANTIC)
311311
ADD_DEFINITIONS( /wd4100 ) # unused formal parameters
312312
ADD_DEFINITIONS( /wd4127 ) # constant conditional expressions (used in Qt template classes)
313313
ADD_DEFINITIONS( /wd4231 ) # nonstandard extension used : 'identifier' before template explicit instantiation (used in Qt template classes)
314+
ADD_DEFINITIONS( /wd4244 ) # conversion from '...' to '...' possible loss of data
314315
ADD_DEFINITIONS( /wd4251 ) # needs to have dll-interface to be used by clients of class (occurs in Qt template classes)
315316
ADD_DEFINITIONS( /wd4275 ) # non dll-interface class '...' used as base for dll-interface class '...'
316317
ADD_DEFINITIONS( /wd4505 ) # unreferenced local function has been removed (QgsRasterDataProvider::extent)

doc/TRANSLATORS

+58-58
Large diffs are not rendered by default.

i18n/qgis_de.ts

+754-738
Large diffs are not rendered by default.

python/core/qgsexpression.sip

+2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ class QgsExpression
6666
//! @note added in 2.2
6767
static bool hasSpecialColumn( const QString& name );
6868

69+
static bool isValid( const QString& text, const QgsFields& fields, QString &errorMessage );
70+
6971
void setScale( double scale );
7072

7173
double scale();

python/core/qgsgeometry.sip

+6
Original file line numberDiff line numberDiff line change
@@ -440,5 +440,11 @@ class QgsGeometry
440440
* @note python binding added in 1.6
441441
**/
442442
void validateGeometry( QList<QgsGeometry::Error> &errors /Out/ );
443+
444+
/** compute the unary union on a list of geometries. May be faster than an iterative union on a set of geometries.
445+
@param geometryList a list of QgsGeometry* as input
446+
@returns the new computed QgsGeometry, or null
447+
*/
448+
static QgsGeometry *unaryUnion( const QList<QgsGeometry*>& geometryList ) /Factory/;
443449
}; // class QgsGeometry
444450

python/core/qgsmapsettings.sip

+5
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ class QgsMapSettings
7272
Flags flags() const;
7373
bool testFlag( Flag flag ) const;
7474

75+
//! sets format of internal QImage
76+
void setOutputImageFormat( QImage::Format format );
77+
//! format of internal QImage, default QImage::Format_ARGB32_Premultiplied
78+
QImage::Format outputImageFormat() const;
79+
7580
bool hasValidSettings() const;
7681
QgsRectangle visibleExtent() const;
7782
double mapUnitsPerPixel() const;

python/core/qgspallabeling.sip

+4
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,10 @@ class QgsPalLabeling : QgsLabelingEngineInterface
666666
bool isShowingPartialsLabels() const;
667667
void setShowingPartialsLabels( bool showing );
668668

669+
//! @note added in 2.4
670+
bool isDrawingOutlineLabels() const;
671+
void setDrawingOutlineLabels( bool outline );
672+
669673
// implemented methods from labeling engine interface
670674

671675
//! called when we're going to start with rendering

python/core/symbology-ng/qgsmarkersymbollayerv2.sip

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ class QgsSvgMarkerSymbolLayerV2 : QgsMarkerSymbolLayerV2
9595
public:
9696
QgsSvgMarkerSymbolLayerV2( QString name = DEFAULT_SVGMARKER_NAME,
9797
double size = DEFAULT_SVGMARKER_SIZE,
98-
double angle = DEFAULT_SVGMARKER_ANGLE );
98+
double angle = DEFAULT_SVGMARKER_ANGLE,
99+
QgsSymbolV2::ScaleMethod scaleMethod = DEFAULT_SCALE_METHOD );
99100

100101
// static stuff
101102

python/gui/layertree/qgslayertreemodel.sip

+12
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ class QgsLayerTreeModel : QAbstractItemModel
1818
#include <qgslayertreemodel.h>
1919
%End
2020

21+
%ConvertToSubClassCode
22+
if (sipCpp->inherits("QgsLayerTreeModel"))
23+
sipType = sipType_QgsLayerTreeModel;
24+
else
25+
sipType = 0;
26+
%End
27+
2128
public:
2229
//! Construct a new tree model with given layer tree (root node must not be null pointer).
2330
//! The root node is not transferred by the model.
@@ -88,6 +95,11 @@ class QgsLayerTreeModel : QAbstractItemModel
8895
//! Set index of the current item. May be used by view. Item marked as current is underlined.
8996
void setCurrentIndex( const QModelIndex& currentIndex );
9097

98+
//! Set font for a particular type of layer tree node. nodeType should come from QgsLayerTreeNode::NodeType enumeration
99+
void setLayerTreeNodeFont( int nodeType, const QFont& font );
100+
//! Get font for a particular type of layer tree node. nodeType should come from QgsLayerTreeNode::NodeType enumeration
101+
QFont layerTreeNodeFont( int nodeType ) const;
102+
91103
signals:
92104

93105
};

python/gui/layertree/qgslayertreeview.sip

+7
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ class QgsLayerTreeView : QTreeView
1919
#include <qgslayertreeview.h>
2020
%End
2121

22+
%ConvertToSubClassCode
23+
if (sipCpp->inherits("QgsLayerTreeView"))
24+
sipType = sipType_QgsLayerTreeView;
25+
else
26+
sipType = 0;
27+
%End
28+
2229
public:
2330
explicit QgsLayerTreeView( QWidget *parent /TransferThis/ = 0 );
2431
~QgsLayerTreeView();

python/gui/qgsfieldexpressionwidget.sip

+15
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class QgsFieldExpressionWidget : QWidget
2020
//! setFilters allows fitering according to the type of field
2121
void setFilters( QgsFieldProxyModel::Filters filters );
2222

23+
void setLeftHandButtonStyle( bool isLeft );
24+
2325
//! currently used filter on list of fields
2426
QgsFieldProxyModel::Filters filters();
2527

@@ -33,6 +35,17 @@ class QgsFieldExpressionWidget : QWidget
3335
*/
3436
QString currentField( bool *isExpression = 0, bool *isValid = 0 );
3537

38+
/**
39+
* Return true if the current expression is valid
40+
*/
41+
bool isValidExpression( QString *expressionError = 0 );
42+
43+
bool isExpression();
44+
/**
45+
* Return the current text that is set in the expression area
46+
*/
47+
QString currentText();
48+
3649
//! Returns the currently used layer
3750
QgsVectorLayer* layer();
3851

@@ -43,6 +56,8 @@ class QgsFieldExpressionWidget : QWidget
4356
//! fieldChanged signal with indication of the validity of the expression
4457
void fieldChanged( QString fieldName, bool isValid );
4558

59+
void returnPressed();
60+
4661
public slots:
4762
//! set the layer used to display the fields and expression
4863
void setLayer( QgsVectorLayer* layer );

python/plugins/processing/ProcessingPlugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def initGui(self):
5656
self.toolbox = ProcessingToolbox()
5757
self.iface.addDockWidget(Qt.RightDockWidgetArea, self.toolbox)
5858
self.toolbox.hide()
59-
#Processing.addAlgListListener(self.toolbox)
59+
Processing.addAlgListListener(self.toolbox)
6060

6161
self.menu = QMenu(self.iface.mainWindow().menuBar())
6262
self.menu.setObjectName( 'processing' )

python/plugins/processing/algs/gdal/GdalAlgorithm.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232

3333

3434
class GdalAlgorithm(GeoAlgorithm):
35-
35+
3636
def getIcon(self):
3737
return QtGui.QIcon(os.path.dirname(__file__) + '/../../images/gdal.png')
3838

3939
class GdalScriptAlgorithm(ScriptAlgorithm):
40-
40+
4141
def getIcon(self):
4242
return QtGui.QIcon(os.path.dirname(__file__) + '/../../images/gdal.png')

python/plugins/processing/algs/gdal/GridAverage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class GridAverage(GdalAlgorithm):
4747
ANGLE = 'ANGLE'
4848
NODATA = 'NODATA'
4949
OUTPUT = 'OUTPUT'
50-
50+
5151
def commandLineName(self):
5252
return "gdalogr:gridaverage"
5353

python/plugins/processing/algs/gdal/GridDataMetrics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class GridDataMetrics(GdalAlgorithm):
5555

5656
def commandLineName(self):
5757
return "gdalogr:griddatametrics"
58-
58+
5959
def defineCharacteristics(self):
6060
self.name = 'Grid (Data metrics)'
6161
self.group = '[GDAL] Analysis'

python/plugins/processing/algs/gdal/GridInvDist.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class GridInvDist(GdalAlgorithm):
5353

5454
def commandLineName(self):
5555
return "gdalogr:gridinvdist"
56-
56+
5757
def defineCharacteristics(self):
5858
self.name = 'Grid (Inverse distance to a power)'
5959
self.group = '[GDAL] Analysis'

python/plugins/processing/algs/gdal/GridNearest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class GridNearest(GdalAlgorithm):
4949

5050
def commandLineName(self):
5151
return "gdalogr:gridnearestneighbor"
52-
52+
5353
def defineCharacteristics(self):
5454
self.name = 'Grid (Nearest neighbor)'
5555
self.group = '[GDAL] Analysis'

python/plugins/processing/algs/gdal/polygonize.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class polygonize(GdalAlgorithm):
3939
INPUT = 'INPUT'
4040
OUTPUT = 'OUTPUT'
4141
FIELD = 'FIELD'
42-
42+
4343
def commandLineName(self):
4444
return "gdalogr:polygonize"
4545

python/plugins/processing/algs/qgis/ftools/ExtractByLocation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def processAlgorithm(self, progress):
5555
filename = self.getParameterValue(self.INTERSECT)
5656
selectLayer = dataobjects.getObjectFromUri(filename)
5757
index = vector.spatialindex(layer)
58-
58+
5959
output = self.getOutputFromName(self.OUTPUT)
6060
writer = output.getVectorWriter(layer.pendingFields(),
6161
layer.dataProvider().geometryType(), layer.crs())

python/plugins/processing/algs/qgis/help/countuniquepointsinpolygon.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ COUNT UNIQUE POINTS IN POLYGON
33

44
Description
55
-----------
6-
This algorithm counts the number of unique values of a points layer in a polygons one. The algorithm creates a new polygons
6+
This algorithm counts the number of unique values of a points layer in a polygons one. The algorithm creates a new polygons
77
layer with an extra column in the attribute table containing the count of unique values for each feature.
88

99
Parameters
1010
----------
1111

1212
- ``Polygons[Vector]``: polygons layer in input
1313
- ``Points[Vector]``: points layer in input
14-
- ``Class field[TableField]``: points layer column name of the unique value chosen
15-
- ``Count field name[String]``: column name containging the count of unique values in the resulting polygons layer
14+
- ``Class field[TableField]``: points layer column name of the unique value chosen
15+
- ``Count field name[String]``: column name containing the count of unique values in the resulting polygons layer
1616

1717
Outputs
1818
-------

python/plugins/processing/algs/saga/SagaAlgorithm.py

+2
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,8 @@ def help(self):
403403
name = ''.join(c for c in name if c in validChars)
404404
html = getHtmlFromRstFile(os.path.join(os.path.dirname(__file__), 'help',
405405
name + '.rst'))
406+
if html is None:
407+
return True, None
406408
imgpath = os.path.join(os.path.dirname(__file__),os.pardir, os.pardir, 'images', 'saga100x100.jpg')
407409
html = ('<img src="%s"/>' % imgpath) + html
408410
return True, html

python/plugins/processing/algs/saga/description/Bifurcation.txt

-9
This file was deleted.

python/plugins/processing/algs/saga/description/ChangeVectorAnalysis.txt

-8
This file was deleted.

python/plugins/processing/algs/saga/description/ColorBlending.txt

-6
This file was deleted.

python/plugins/processing/algs/saga/description/CombineGrids.txt

-6
This file was deleted.

python/plugins/processing/algs/saga/description/FractalDimensionofGridSurface.txt

-4
This file was deleted.

python/plugins/processing/algs/saga/description/GaussianLandscapes.txt

-8
This file was deleted.

python/plugins/processing/algs/saga/description/ViGrABasicMorphologicalOperations.txt

-8
This file was deleted.

python/plugins/processing/algs/saga/description/ViGrADistance.txt

-5
This file was deleted.

python/plugins/processing/algs/saga/description/ViGrAEdgeDetection.txt

-7
This file was deleted.

python/plugins/processing/algs/saga/description/ViGrAFourierTransform(Real).txt

-4
This file was deleted.

python/plugins/processing/algs/saga/description/ViGrAFourierTransform.txt

-6
This file was deleted.

python/plugins/processing/algs/saga/description/ViGrAFourierTransformInverse.txt

-7
This file was deleted.

python/plugins/processing/algs/saga/description/ViGrASmoothing.txt

-7
This file was deleted.

python/plugins/processing/algs/saga/description/ViGrAWatershedSegmentation.txt

-7
This file was deleted.

python/plugins/processing/core/GeoAlgorithm.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -117,20 +117,20 @@ def help(self):
117117
where the description is stored.
118118
119119
Returns None if there is no help file available.
120-
121-
The default implementation looks for an rst file in a help folder under the folder
120+
121+
The default implementation looks for an rst file in a help folder under the folder
122122
where the algorithm is located.
123123
The name of the file is the name console name of the algorithm, without the namespace part
124124
"""
125125
name = self.commandLineName().split(':')[1].lower()
126-
filename = os.path.join(os.path.dirname(inspect.getfile(self.__class__)), 'help', name + '.rst')
127-
print filename
126+
filename = os.path.join(os.path.dirname(inspect.getfile(self.__class__)), 'help', name + '.rst')
127+
print filename
128128
try:
129129
html = getHtmlFromRstFile(filename)
130130
return True, html
131131
except:
132132
return False, None
133-
133+
134134

135135
def processAlgorithm(self):
136136
"""Here goes the algorithm itself.

0 commit comments

Comments
 (0)