Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
indentation update [ci skip]
  • Loading branch information
jef-n committed Nov 30, 2014
1 parent 4d4fa44 commit e48a6f6
Show file tree
Hide file tree
Showing 19 changed files with 74 additions and 73 deletions.
4 changes: 2 additions & 2 deletions python/core/symbology-ng/qgsheatmaprenderer.sip
Expand Up @@ -37,7 +37,7 @@ class QgsHeatmapRenderer : QgsFeatureRendererV2
* @see colorRamp
*/
void setColorRamp( QgsVectorColorRampV2* ramp /Transfer/ );

/**Returns whether the ramp is inverted
* @returns true if color ramp is inverted
* @see setInvertRamp
Expand Down Expand Up @@ -121,7 +121,7 @@ class QgsHeatmapRenderer : QgsFeatureRendererV2
* @see renderQuality
*/
void setRenderQuality( const int quality );

/**Returns the expression used for weighting points when generating the heatmap.
* @returns point weight expression. If empty, all points are equally weighted.
* @see setWeightExpression
Expand Down
2 changes: 1 addition & 1 deletion python/core/symbology-ng/qgssymbolv2.sip
Expand Up @@ -54,7 +54,7 @@ class QgsSymbolV2
SymbolType type() const;

// symbol layers handling

/**Returns list of symbol layers contained in the symbol.
* @returns symbol layers list
* @note added in QGIS 2.7
Expand Down
2 changes: 1 addition & 1 deletion python/gui/symbology-ng/qgsheatmaprendererwidget.sip
Expand Up @@ -17,7 +17,7 @@ class QgsHeatmapRendererWidget : QgsRendererV2Widget
* @param renderer the mask renderer (will take ownership)
*/
QgsHeatmapRendererWidget( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer );

/** @returns the current feature renderer */
virtual QgsFeatureRendererV2* renderer();
};
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/buildvrt.py
Expand Up @@ -42,7 +42,7 @@ class buildvrt(GdalAlgorithm):
RESOLUTION = 'RESOLUTION'
SEPARATE = 'SEPARATE'
PROJ_DIFFERENCE = 'PROJ_DIFFERENCE'

RESOLUTION_OPTIONS = ['average', 'highest', 'lowest']

def defineCharacteristics(self):
Expand Down
36 changes: 18 additions & 18 deletions python/plugins/processing/algs/gdal/ogr2ogrtopostgis.py
Expand Up @@ -73,9 +73,9 @@ class Ogr2OgrToPostGis(OgrAlgorithm):
ADDFIELDS = 'ADDFIELDS'
LAUNDER = 'LAUNDER'
INDEX = 'INDEX'
SKIPFAILURES = 'SKIPFAILURES'
SKIPFAILURES = 'SKIPFAILURES'
OPTIONS = 'OPTIONS'

def defineCharacteristics(self):
self.name = 'Import Vector into PostGIS database (new connection)'
self.group = '[OGR] Miscellaneous'
Expand All @@ -89,7 +89,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterString(self.HOST, 'Host',
'localhost', optional=False))
self.addParameter(ParameterString(self.PORT, 'Port',
'5432', optional=False))
'5432', optional=False))
self.addParameter(ParameterString(self.USER, 'Username',
'', optional=False))
self.addParameter(ParameterString(self.DBNAME, 'Database Name',
Expand All @@ -114,15 +114,15 @@ def defineCharacteristics(self):
self.addParameter(ParameterBoolean(self.CLIP,
'Clip the input layer using the above (rectangle) extent', False))
self.addParameter(ParameterString(self.WHERE, 'Select features using a SQL "WHERE" statement (Ex: column="value")',
'', optional=True))
'', optional=True))
self.addParameter(ParameterString(self.GT, 'Group "n" features per transaction (Default: 20000)',
'', optional=True))
self.addParameter(ParameterBoolean(self.OVERWRITE,
'Overwrite existing table?', True))
'Overwrite existing table?', True))
self.addParameter(ParameterBoolean(self.APPEND,
'Append to existing table?', False))
'Append to existing table?', False))
self.addParameter(ParameterBoolean(self.ADDFIELDS,
'Append and add new fields to existing table?', False))
'Append and add new fields to existing table?', False))
self.addParameter(ParameterBoolean(self.LAUNDER,
'Do not launder columns/table name/s?', False))
self.addParameter(ParameterBoolean(self.INDEX,
Expand All @@ -142,23 +142,23 @@ def processAlgorithm(self, progress):
user = unicode(self.getParameterValue(self.USER))
dbname = unicode(self.getParameterValue(self.DBNAME))
password = unicode(self.getParameterValue(self.PASSWORD))
schema = unicode(self.getParameterValue(self.SCHEMA))
schema = unicode(self.getParameterValue(self.SCHEMA))
schemastring = "-lco SCHEMA="+schema
table = unicode(self.getParameterValue(self.TABLE))
table = unicode(self.getParameterValue(self.TABLE))
pk = unicode(self.getParameterValue(self.PK))
pkstring = "-lco FID="+pk
geocolumn = unicode(self.getParameterValue(self.GEOCOLUMN))
geocolumnstring = "-lco GEOMETRY_NAME="+geocolumn
dim = self.DIMLIST[self.getParameterValue(self.DIM)]
dimstring = "-lco DIM="+dim
simplify = unicode(self.getParameterValue(self.SIMPLIFY))
segmentize = unicode(self.getParameterValue(self.SEGMENTIZE))
segmentize = unicode(self.getParameterValue(self.SEGMENTIZE))
spat = self.getParameterValue(self.SPAT)
ogrspat = self.ogrConnectionString(spat)
clip = self.getParameterValue(self.CLIP)
clip = self.getParameterValue(self.CLIP)
where = unicode(self.getParameterValue(self.WHERE))
wherestring = "-where '"+where+"'"
gt = unicode(self.getParameterValue(self.GT))
gt = unicode(self.getParameterValue(self.GT))
overwrite = self.getParameterValue(self.OVERWRITE)
append = self.getParameterValue(self.APPEND)
addfields = self.getParameterValue(self.ADDFIELDS)
Expand All @@ -171,7 +171,7 @@ def processAlgorithm(self, progress):

arguments = []
arguments.append('-progress')
arguments.append('--config PG_USE_COPY YES')
arguments.append('--config PG_USE_COPY YES')
arguments.append('-f')
arguments.append('PostgreSQL')
arguments.append('PG:"host=')
Expand All @@ -185,7 +185,7 @@ def processAlgorithm(self, progress):
arguments.append('password=')
arguments.append(password)
arguments.append('"')
arguments.append(dimstring)
arguments.append(dimstring)
arguments.append(ogrLayer)
if index:
arguments.append(indexstring)
Expand All @@ -208,13 +208,13 @@ def processAlgorithm(self, progress):
arguments.append(pkstring)
if len(table) > 0:
arguments.append('-nln')
arguments.append(table)
arguments.append(table)
if len(ssrs) > 0:
arguments.append('-s_srs')
arguments.append(ssrs)
arguments.append(ssrs)
if len(tsrs) > 0:
arguments.append('-t_srs')
arguments.append(tsrs)
arguments.append(tsrs)
if len(spat) > 0:
regionCoords = ogrspat.split(',')
arguments.append('-spat')
Expand All @@ -227,7 +227,7 @@ def processAlgorithm(self, progress):
if skipfailures:
arguments.append('-skipfailures')
if where:
arguments.append(wherestring)
arguments.append(wherestring)
if len(simplify) > 0:
arguments.append('-simplify')
arguments.append(simplify)
Expand Down
34 changes: 17 additions & 17 deletions python/plugins/processing/algs/gdal/ogr2ogrtopostgislist.py
Expand Up @@ -76,14 +76,14 @@ class Ogr2OgrToPostGisList(OgrAlgorithm):
ADDFIELDS = 'ADDFIELDS'
LAUNDER = 'LAUNDER'
INDEX = 'INDEX'
SKIPFAILURES = 'SKIPFAILURES'
SKIPFAILURES = 'SKIPFAILURES'
OPTIONS = 'OPTIONS'

def dbConnectionNames(self):
settings = QSettings()
settings.beginGroup('/PostgreSQL/connections/')
return settings.childGroups()

def defineCharacteristics(self):
self.name = 'Import Vector into PostGIS database (available connections)'
self.group = '[OGR] Miscellaneous'
Expand Down Expand Up @@ -115,15 +115,15 @@ def defineCharacteristics(self):
self.addParameter(ParameterBoolean(self.CLIP,
'Clip the input layer using the above (rectangle) extent', False))
self.addParameter(ParameterString(self.WHERE, 'Select features using a SQL "WHERE" statement (Ex: column="value")',
'', optional=True))
'', optional=True))
self.addParameter(ParameterString(self.GT, 'Group "n" features per transaction (Default: 20000)',
'', optional=True))
self.addParameter(ParameterBoolean(self.OVERWRITE,
'Overwrite existing table?', True))
'Overwrite existing table?', True))
self.addParameter(ParameterBoolean(self.APPEND,
'Append to existing table?', False))
'Append to existing table?', False))
self.addParameter(ParameterBoolean(self.ADDFIELDS,
'Append and add new fields to existing table?', False))
'Append and add new fields to existing table?', False))
self.addParameter(ParameterBoolean(self.LAUNDER,
'Do not launder columns/table name/s?', False))
self.addParameter(ParameterBoolean(self.INDEX,
Expand All @@ -146,23 +146,23 @@ def processAlgorithm(self, progress):
ogrLayer = self.ogrConnectionString(inLayer)
ssrs = unicode(self.getParameterValue(self.S_SRS))
tsrs = unicode(self.getParameterValue(self.T_SRS))
schema = unicode(self.getParameterValue(self.SCHEMA))
schema = unicode(self.getParameterValue(self.SCHEMA))
schemastring = "-lco SCHEMA="+schema
table = unicode(self.getParameterValue(self.TABLE))
table = unicode(self.getParameterValue(self.TABLE))
pk = unicode(self.getParameterValue(self.PK))
pkstring = "-lco FID="+pk
geocolumn = unicode(self.getParameterValue(self.GEOCOLUMN))
geocolumnstring = "-lco GEOMETRY_NAME="+geocolumn
dim = self.DIMLIST[self.getParameterValue(self.DIM)]
dimstring = "-lco DIM="+dim
simplify = unicode(self.getParameterValue(self.SIMPLIFY))
segmentize = unicode(self.getParameterValue(self.SEGMENTIZE))
segmentize = unicode(self.getParameterValue(self.SEGMENTIZE))
spat = self.getParameterValue(self.SPAT)
ogrspat = self.ogrConnectionString(spat)
clip = self.getParameterValue(self.CLIP)
clip = self.getParameterValue(self.CLIP)
where = unicode(self.getParameterValue(self.WHERE))
wherestring = "-where '"+where+"'"
gt = unicode(self.getParameterValue(self.GT))
gt = unicode(self.getParameterValue(self.GT))
overwrite = self.getParameterValue(self.OVERWRITE)
append = self.getParameterValue(self.APPEND)
addfields = self.getParameterValue(self.ADDFIELDS)
Expand All @@ -175,7 +175,7 @@ def processAlgorithm(self, progress):

arguments = []
arguments.append('-progress')
arguments.append('--config PG_USE_COPY YES')
arguments.append('--config PG_USE_COPY YES')
arguments.append('-f')
arguments.append('PostgreSQL')
arguments.append('PG:"host=')
Expand All @@ -189,7 +189,7 @@ def processAlgorithm(self, progress):
arguments.append('password=')
arguments.append(password)
arguments.append('"')
arguments.append(dimstring)
arguments.append(dimstring)
arguments.append(ogrLayer)
if index:
arguments.append(indexstring)
Expand All @@ -212,13 +212,13 @@ def processAlgorithm(self, progress):
arguments.append(pkstring)
if len(table) > 0:
arguments.append('-nln')
arguments.append(table)
arguments.append(table)
if len(ssrs) > 0:
arguments.append('-s_srs')
arguments.append(ssrs)
arguments.append(ssrs)
if len(tsrs) > 0:
arguments.append('-t_srs')
arguments.append(tsrs)
arguments.append(tsrs)
if len(spat) > 0:
regionCoords = ogrspat.split(',')
arguments.append('-spat')
Expand All @@ -231,7 +231,7 @@ def processAlgorithm(self, progress):
if skipfailures:
arguments.append('-skipfailures')
if where:
arguments.append(wherestring)
arguments.append(wherestring)
if len(simplify) > 0:
arguments.append('-simplify')
arguments.append(simplify)
Expand Down
6 changes: 3 additions & 3 deletions python/plugins/processing/core/Processing.py
Expand Up @@ -151,10 +151,10 @@ def initialize():
ProcessingConfig.readSettings()
RenderingStyles.loadStyles()
Processing.loadFromProviders()

# Inform registered listeners that all providers' algorithms have been loaded
Processing.fireAlgsListHasChanged()

@staticmethod
def updateAlgsList():
"""Call this method when there has been any change that
Expand Down Expand Up @@ -185,7 +185,7 @@ def addAlgListListener(listener):
called for all registered listeners.
"""
Processing.listeners.append(listener)

@staticmethod
def removeAlgListListener(listener):
try:
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/script/snippets.py
@@ -1,4 +1,4 @@
##Iterate over the features of a layer.
##Iterate over the features of a layer.
feats = processing.features(layer)
n = len(feats)
for i, feat in enumerate(feats):
Expand All @@ -9,7 +9,7 @@
fields = processing.fields(layer)
# int, float and bool can be used as well as types
fields.append(('NEW_FIELD', str))
writer = processing.VectorWriter(output_file, None, fields,
writer = processing.VectorWriter(output_file, None, fields,
processing.geomtype(layer), layer.crs())

##Create a new table
Expand Down
6 changes: 3 additions & 3 deletions src/app/qgsattributetabledialog.cpp
Expand Up @@ -307,13 +307,13 @@ void QgsAttributeTableDialog::updateFieldFromExpression()

bool filtered = mMainView->filterMode() != QgsAttributeTableFilterModel::ShowAll;
QgsFeatureIds filteredIds = filtered ? mMainView->filteredFeatures() : QgsFeatureIds();
this->runFieldCalculation(mLayer, mFieldCombo->currentText(), mUpdateExpressionText->currentField(), filteredIds);
this->runFieldCalculation( mLayer, mFieldCombo->currentText(), mUpdateExpressionText->currentField(), filteredIds );
}

void QgsAttributeTableDialog::updateFieldFromExpressionSelected()
{
QgsFeatureIds filteredIds = mLayer->selectedFeaturesIds();
this->runFieldCalculation(mLayer, mFieldCombo->currentText(), mUpdateExpressionText->currentField(), filteredIds);
this->runFieldCalculation( mLayer, mFieldCombo->currentText(), mUpdateExpressionText->currentField(), filteredIds );
}

void QgsAttributeTableDialog::runFieldCalculation( QgsVectorLayer* layer, QString fieldName, QString expression, QgsFeatureIds filteredIds )
Expand Down Expand Up @@ -345,7 +345,7 @@ void QgsAttributeTableDialog::runFieldCalculation( QgsVectorLayer* layer, QStrin
{
if ( !filteredIds.isEmpty() && !filteredIds.contains( feature.id() ) )
{
continue;
continue;
}

exp.setCurrentRowNumber( rownum );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsattributetabledialog.h
Expand Up @@ -185,7 +185,7 @@ class APP_EXPORT QgsAttributeTableDialog : public QDialog, private Ui::QgsAttrib
*/
void columnBoxInit();

void runFieldCalculation( QgsVectorLayer* layer, QString fieldName, QString expression, QgsFeatureIds filteredIds = QgsFeatureIds());
void runFieldCalculation( QgsVectorLayer* layer, QString fieldName, QString expression, QgsFeatureIds filteredIds = QgsFeatureIds() );
void updateFieldFromExpression();
void updateFieldFromExpressionSelected();

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsguivectorlayertools.h
Expand Up @@ -67,7 +67,7 @@ class QgsGuiVectorLayerTools : public QgsVectorLayerTools, public QObject
* @param layer The layer to commit
* @return True if successful
*/
bool saveEdits( QgsVectorLayer* layer) const;
bool saveEdits( QgsVectorLayer* layer ) const;

private:
void commitError( QgsVectorLayer* vlayer ) const;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgis.h
Expand Up @@ -296,7 +296,7 @@ class CORE_EXPORT QGis
// It's assumed that this works on all systems supporting
// QLibrary
#if QT_VERSION >= 0x050000
#define cast_to_fptr(f) f
#define cast_to_fptr(f) f
#else
inline void ( *cast_to_fptr( void *p ) )()
{
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsmultirenderchecker.cpp
Expand Up @@ -51,7 +51,7 @@ bool QgsMultiRenderChecker::runTest( const QString& theTestName, unsigned int th

QVector<QgsDartMeasurement> dartMeasurements;

Q_FOREACH( const QString& suffix, subDirs )
Q_FOREACH ( const QString& suffix, subDirs )
{
qDebug() << "Checking subdir " << suffix;
bool result;
Expand Down Expand Up @@ -83,8 +83,8 @@ bool QgsMultiRenderChecker::runTest( const QString& theTestName, unsigned int th

if ( !successful )
{
Q_FOREACH( const QgsDartMeasurement& measurement, dartMeasurements )
measurement.send();
Q_FOREACH ( const QgsDartMeasurement& measurement, dartMeasurements )
measurement.send();

QgsDartMeasurement msg( "Image not accepted by test", QgsDartMeasurement::Text, "This may be caused because the test is supposed to fail or rendering inconsistencies."
"If this is a rendering inconsistency, please add another control image folder, add an anomaly image or increase the color tolerance." );
Expand Down
4 changes: 2 additions & 2 deletions src/gui/attributetable/qgsdualview.cpp
Expand Up @@ -121,7 +121,7 @@ void QgsDualView::columnBoxInit()
// ... If there are primary key(s) defined
QStringList pkFields;

Q_FOREACH( int attr, pkAttrs )
Q_FOREACH ( int attr, pkAttrs )
{
pkFields.append( "COALESCE(\"" + fields[attr].name() + "\", '<NULL>')" );
}
Expand Down Expand Up @@ -152,7 +152,7 @@ void QgsDualView::columnBoxInit()
mFeatureListPreviewButton->addAction( mActionExpressionPreview );
mFeatureListPreviewButton->addAction( mActionPreviewColumnsMenu );

Q_FOREACH( const QgsField& field, fields )
Q_FOREACH ( const QgsField& field, fields )
{
if ( mLayerCache->layer()->editorWidgetV2( mLayerCache->layer()->fieldNameIndex( field.name() ) ) != "Hidden" )
{
Expand Down

0 comments on commit e48a6f6

Please sign in to comment.