Skip to content
Permalink
Browse files

indentation update [ci skip]

  • Loading branch information
jef-n committed Nov 30, 2014
1 parent 4d4fa44 commit e48a6f642f16c64779f28c4f382bb1c2cf52e5f2
@@ -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
@@ -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
@@ -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
@@ -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();
};
@@ -42,7 +42,7 @@ class buildvrt(GdalAlgorithm):
RESOLUTION = 'RESOLUTION'
SEPARATE = 'SEPARATE'
PROJ_DIFFERENCE = 'PROJ_DIFFERENCE'

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

def defineCharacteristics(self):
@@ -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'
@@ -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',
@@ -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,
@@ -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)
@@ -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=')
@@ -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)
@@ -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')
@@ -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)
@@ -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'
@@ -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,
@@ -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)
@@ -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=')
@@ -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)
@@ -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')
@@ -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)
@@ -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
@@ -185,7 +185,7 @@ def addAlgListListener(listener):
called for all registered listeners.
"""
Processing.listeners.append(listener)

@staticmethod
def removeAlgListListener(listener):
try:
@@ -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):
@@ -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
@@ -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 )
@@ -345,7 +345,7 @@ void QgsAttributeTableDialog::runFieldCalculation( QgsVectorLayer* layer, QStrin
{
if ( !filteredIds.isEmpty() && !filteredIds.contains( feature.id() ) )
{
continue;
continue;
}

exp.setCurrentRowNumber( rownum );
@@ -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();

@@ -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;
@@ -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 ) )()
{
@@ -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;
@@ -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." );
@@ -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>')" );
}
@@ -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" )
{

0 comments on commit e48a6f6

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