Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #2 from qgis/master
Forked source update request
  • Loading branch information
Qgis-Tr-kr committed Jun 15, 2014
2 parents 637dca7 + 6c21262 commit c884e15
Show file tree
Hide file tree
Showing 124 changed files with 1,851 additions and 1,795 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -311,6 +311,7 @@ IF (PEDANTIC)
ADD_DEFINITIONS( /wd4100 ) # unused formal parameters
ADD_DEFINITIONS( /wd4127 ) # constant conditional expressions (used in Qt template classes)
ADD_DEFINITIONS( /wd4231 ) # nonstandard extension used : 'identifier' before template explicit instantiation (used in Qt template classes)
ADD_DEFINITIONS( /wd4244 ) # conversion from '...' to '...' possible loss of data
ADD_DEFINITIONS( /wd4251 ) # needs to have dll-interface to be used by clients of class (occurs in Qt template classes)
ADD_DEFINITIONS( /wd4275 ) # non dll-interface class '...' used as base for dll-interface class '...'
ADD_DEFINITIONS( /wd4505 ) # unreferenced local function has been removed (QgsRasterDataProvider::extent)
Expand Down
116 changes: 58 additions & 58 deletions doc/TRANSLATORS

Large diffs are not rendered by default.

1,492 changes: 754 additions & 738 deletions i18n/qgis_de.ts

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions python/core/qgsexpression.sip
Expand Up @@ -66,6 +66,8 @@ class QgsExpression
//! @note added in 2.2
static bool hasSpecialColumn( const QString& name );

static bool isValid( const QString& text, const QgsFields& fields, QString &errorMessage );

void setScale( double scale );

double scale();
Expand Down
6 changes: 6 additions & 0 deletions python/core/qgsgeometry.sip
Expand Up @@ -440,5 +440,11 @@ class QgsGeometry
* @note python binding added in 1.6
**/
void validateGeometry( QList<QgsGeometry::Error> &errors /Out/ );

/** compute the unary union on a list of geometries. May be faster than an iterative union on a set of geometries.
@param geometryList a list of QgsGeometry* as input
@returns the new computed QgsGeometry, or null
*/
static QgsGeometry *unaryUnion( const QList<QgsGeometry*>& geometryList ) /Factory/;
}; // class QgsGeometry

5 changes: 5 additions & 0 deletions python/core/qgsmapsettings.sip
Expand Up @@ -72,6 +72,11 @@ class QgsMapSettings
Flags flags() const;
bool testFlag( Flag flag ) const;

//! sets format of internal QImage
void setOutputImageFormat( QImage::Format format );
//! format of internal QImage, default QImage::Format_ARGB32_Premultiplied
QImage::Format outputImageFormat() const;

bool hasValidSettings() const;
QgsRectangle visibleExtent() const;
double mapUnitsPerPixel() const;
Expand Down
4 changes: 4 additions & 0 deletions python/core/qgspallabeling.sip
Expand Up @@ -666,6 +666,10 @@ class QgsPalLabeling : QgsLabelingEngineInterface
bool isShowingPartialsLabels() const;
void setShowingPartialsLabels( bool showing );

//! @note added in 2.4
bool isDrawingOutlineLabels() const;
void setDrawingOutlineLabels( bool outline );

// implemented methods from labeling engine interface

//! called when we're going to start with rendering
Expand Down
3 changes: 2 additions & 1 deletion python/core/symbology-ng/qgsmarkersymbollayerv2.sip
Expand Up @@ -95,7 +95,8 @@ class QgsSvgMarkerSymbolLayerV2 : QgsMarkerSymbolLayerV2
public:
QgsSvgMarkerSymbolLayerV2( QString name = DEFAULT_SVGMARKER_NAME,
double size = DEFAULT_SVGMARKER_SIZE,
double angle = DEFAULT_SVGMARKER_ANGLE );
double angle = DEFAULT_SVGMARKER_ANGLE,
QgsSymbolV2::ScaleMethod scaleMethod = DEFAULT_SCALE_METHOD );

// static stuff

Expand Down
12 changes: 12 additions & 0 deletions python/gui/layertree/qgslayertreemodel.sip
Expand Up @@ -18,6 +18,13 @@ class QgsLayerTreeModel : QAbstractItemModel
#include <qgslayertreemodel.h>
%End

%ConvertToSubClassCode
if (sipCpp->inherits("QgsLayerTreeModel"))
sipType = sipType_QgsLayerTreeModel;
else
sipType = 0;
%End

public:
//! Construct a new tree model with given layer tree (root node must not be null pointer).
//! The root node is not transferred by the model.
Expand Down Expand Up @@ -88,6 +95,11 @@ class QgsLayerTreeModel : QAbstractItemModel
//! Set index of the current item. May be used by view. Item marked as current is underlined.
void setCurrentIndex( const QModelIndex& currentIndex );

//! Set font for a particular type of layer tree node. nodeType should come from QgsLayerTreeNode::NodeType enumeration
void setLayerTreeNodeFont( int nodeType, const QFont& font );
//! Get font for a particular type of layer tree node. nodeType should come from QgsLayerTreeNode::NodeType enumeration
QFont layerTreeNodeFont( int nodeType ) const;

signals:

};
7 changes: 7 additions & 0 deletions python/gui/layertree/qgslayertreeview.sip
Expand Up @@ -19,6 +19,13 @@ class QgsLayerTreeView : QTreeView
#include <qgslayertreeview.h>
%End

%ConvertToSubClassCode
if (sipCpp->inherits("QgsLayerTreeView"))
sipType = sipType_QgsLayerTreeView;
else
sipType = 0;
%End

public:
explicit QgsLayerTreeView( QWidget *parent /TransferThis/ = 0 );
~QgsLayerTreeView();
Expand Down
15 changes: 15 additions & 0 deletions python/gui/qgsfieldexpressionwidget.sip
Expand Up @@ -20,6 +20,8 @@ class QgsFieldExpressionWidget : QWidget
//! setFilters allows fitering according to the type of field
void setFilters( QgsFieldProxyModel::Filters filters );

void setLeftHandButtonStyle( bool isLeft );

//! currently used filter on list of fields
QgsFieldProxyModel::Filters filters();

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

/**
* Return true if the current expression is valid
*/
bool isValidExpression( QString *expressionError = 0 );

bool isExpression();
/**
* Return the current text that is set in the expression area
*/
QString currentText();

//! Returns the currently used layer
QgsVectorLayer* layer();

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

void returnPressed();

public slots:
//! set the layer used to display the fields and expression
void setLayer( QgsVectorLayer* layer );
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/ProcessingPlugin.py
Expand Up @@ -56,7 +56,7 @@ def initGui(self):
self.toolbox = ProcessingToolbox()
self.iface.addDockWidget(Qt.RightDockWidgetArea, self.toolbox)
self.toolbox.hide()
#Processing.addAlgListListener(self.toolbox)
Processing.addAlgListListener(self.toolbox)

self.menu = QMenu(self.iface.mainWindow().menuBar())
self.menu.setObjectName( 'processing' )
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/gdal/GdalAlgorithm.py
Expand Up @@ -32,11 +32,11 @@


class GdalAlgorithm(GeoAlgorithm):

def getIcon(self):
return QtGui.QIcon(os.path.dirname(__file__) + '/../../images/gdal.png')

class GdalScriptAlgorithm(ScriptAlgorithm):

def getIcon(self):
return QtGui.QIcon(os.path.dirname(__file__) + '/../../images/gdal.png')
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/GridAverage.py
Expand Up @@ -47,7 +47,7 @@ class GridAverage(GdalAlgorithm):
ANGLE = 'ANGLE'
NODATA = 'NODATA'
OUTPUT = 'OUTPUT'

def commandLineName(self):
return "gdalogr:gridaverage"

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/GridDataMetrics.py
Expand Up @@ -55,7 +55,7 @@ class GridDataMetrics(GdalAlgorithm):

def commandLineName(self):
return "gdalogr:griddatametrics"

def defineCharacteristics(self):
self.name = 'Grid (Data metrics)'
self.group = '[GDAL] Analysis'
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/GridInvDist.py
Expand Up @@ -53,7 +53,7 @@ class GridInvDist(GdalAlgorithm):

def commandLineName(self):
return "gdalogr:gridinvdist"

def defineCharacteristics(self):
self.name = 'Grid (Inverse distance to a power)'
self.group = '[GDAL] Analysis'
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/GridNearest.py
Expand Up @@ -49,7 +49,7 @@ class GridNearest(GdalAlgorithm):

def commandLineName(self):
return "gdalogr:gridnearestneighbor"

def defineCharacteristics(self):
self.name = 'Grid (Nearest neighbor)'
self.group = '[GDAL] Analysis'
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/polygonize.py
Expand Up @@ -39,7 +39,7 @@ class polygonize(GdalAlgorithm):
INPUT = 'INPUT'
OUTPUT = 'OUTPUT'
FIELD = 'FIELD'

def commandLineName(self):
return "gdalogr:polygonize"

Expand Down
Expand Up @@ -55,7 +55,7 @@ def processAlgorithm(self, progress):
filename = self.getParameterValue(self.INTERSECT)
selectLayer = dataobjects.getObjectFromUri(filename)
index = vector.spatialindex(layer)

output = self.getOutputFromName(self.OUTPUT)
writer = output.getVectorWriter(layer.pendingFields(),
layer.dataProvider().geometryType(), layer.crs())
Expand Down
Expand Up @@ -3,16 +3,16 @@ COUNT UNIQUE POINTS IN POLYGON

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

Parameters
----------

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

Outputs
-------
Expand Down
2 changes: 2 additions & 0 deletions python/plugins/processing/algs/saga/SagaAlgorithm.py
Expand Up @@ -403,6 +403,8 @@ def help(self):
name = ''.join(c for c in name if c in validChars)
html = getHtmlFromRstFile(os.path.join(os.path.dirname(__file__), 'help',
name + '.rst'))
if html is None:
return True, None
imgpath = os.path.join(os.path.dirname(__file__),os.pardir, os.pardir, 'images', 'saga100x100.jpg')
html = ('<img src="%s"/>' % imgpath) + html
return True, html
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 5 additions & 5 deletions python/plugins/processing/core/GeoAlgorithm.py
Expand Up @@ -117,20 +117,20 @@ def help(self):
where the description is stored.
Returns None if there is no help file available.
The default implementation looks for an rst file in a help folder under the folder
The default implementation looks for an rst file in a help folder under the folder
where the algorithm is located.
The name of the file is the name console name of the algorithm, without the namespace part
"""
name = self.commandLineName().split(':')[1].lower()
filename = os.path.join(os.path.dirname(inspect.getfile(self.__class__)), 'help', name + '.rst')
print filename
filename = os.path.join(os.path.dirname(inspect.getfile(self.__class__)), 'help', name + '.rst')
print filename
try:
html = getHtmlFromRstFile(filename)
return True, html
except:
return False, None


def processAlgorithm(self):
"""Here goes the algorithm itself.
Expand Down

0 comments on commit c884e15

Please sign in to comment.