Skip to content
Permalink
Browse files

indentation update

  • Loading branch information
jef-n committed May 27, 2013
1 parent 8cf9f7b commit ebc8e6c508ac6ccc1424724f3a223abdc5791473
@@ -81,8 +81,6 @@ def __init__(self, iface, db, parent=None):
def showEvent(self, event):
QDialog.showEvent(self, event)
self.updatePresetsCombobox()



def updatePresetsCombobox(self):
entries = QgsProject.instance().subkeyList('DBManager','savedQueries')
@@ -108,7 +106,7 @@ def storePreset(self):
self.presetCombo.setCurrentIndex(self.presetCombo.count()-1)
else:
self.presetCombo.setCurrentIndex(index)

def deletePreset(self):
name = self.presetCombo.currentText()
QgsProject.instance().removeEntry('DBManager','savedQueries/q'+str(name.__hash__()) )
@@ -465,3 +465,4 @@ specifed:specified
widht:width
heigth:height
heigh:height
delimted:delimited
@@ -1985,12 +1985,12 @@ bool QgsLegend::readXML( QDomNode& legendnode )

mUpdateDrawingOrder = true;

if( !readXML( 0, legendnode ) )
if ( !readXML( 0, legendnode ) )
return false;

if( legendnode.toElement().attribute( "updateDrawingOrder", "true" ) != "true" )
if ( legendnode.toElement().attribute( "updateDrawingOrder", "true" ) != "true" )
{
if( !verifyDrawingOrder() )
if ( !verifyDrawingOrder() )
QgsMessageLog::logMessage( tr( "Not fully defined drawing order set to legend order." ), tr( "Legend" ), QgsMessageLog::WARNING );

mUpdateDrawingOrder = false;
@@ -2985,7 +2985,7 @@ bool QgsLegend::verifyDrawingOrder()
hasUndefinedOrder |= ll && ll->drawingOrder() < 0;
}

if( !hasUndefinedOrder )
if ( !hasUndefinedOrder )
return true;

int i = 0;
@@ -5281,7 +5281,7 @@ void QgisApp::deselectAll()
void QgisApp::selectByExpression()
{
QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( mMapCanvas->currentLayer() );
if( !vlayer )
if ( !vlayer )
{
messageBar()->pushMessage(
tr( "No active vector layer" ),
@@ -1,5 +1,3 @@


#############################################################
# sources

@@ -51,7 +51,7 @@ extern "C"

QgsOfflineEditing::QgsOfflineEditing()
{
connect( QgsMapLayerRegistry::instance(), SIGNAL( layerWasAdded( QgsMapLayer* ) ), this, SLOT( layerAdded( QgsMapLayer* ) ) );
connect( QgsMapLayerRegistry::instance(), SIGNAL( layerWasAdded( QgsMapLayer* ) ), this, SLOT( layerAdded( QgsMapLayer* ) ) );
}

QgsOfflineEditing::~QgsOfflineEditing()
@@ -524,7 +524,7 @@ void QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlite3* db, con
// fill gap in QgsAttributeMap if geometry column is not last (WORKAROUND)
int column = 0;
QgsAttributes attrs = f.attributes();
QgsAttributes newAttrs(attrs.count());
QgsAttributes newAttrs( attrs.count() );
for ( int it = 0; it < attrs.count(); ++it )
{
newAttrs[column++] = attrs[it];
@@ -555,7 +555,7 @@ void QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlite3* db, con
int remoteCount = remoteFeatureIds.size();
for ( int i = 0; i < remoteCount; i++ )
{
addFidLookup( db, layerId, offlineFeatureIds.at( i ), remoteFeatureIds.at( remoteCount - (i+1) ) );
addFidLookup( db, layerId, offlineFeatureIds.at( i ), remoteFeatureIds.at( remoteCount - ( i + 1 ) ) );
emit progressUpdated( featureCount++ );
}
sqlExec( db, "COMMIT" );
@@ -1208,15 +1208,15 @@ void QgsOfflineEditing::stopListenFeatureChanges()
QgsVectorLayer* vLayer = qobject_cast<QgsVectorLayer *>( sender() );
// disable logging
disconnect( vLayer->editBuffer(), SIGNAL( committedAttributesAdded( const QString&, const QList<QgsField>& ) ),
this, SLOT( committedAttributesAdded( const QString&, const QList<QgsField>& ) ) );
this, SLOT( committedAttributesAdded( const QString&, const QList<QgsField>& ) ) );
disconnect( vLayer, SIGNAL( committedFeaturesAdded( const QString&, const QgsFeatureList& ) ),
this, SLOT( committedFeaturesAdded( const QString&, const QgsFeatureList& ) ) );
this, SLOT( committedFeaturesAdded( const QString&, const QgsFeatureList& ) ) );
disconnect( vLayer, SIGNAL( committedFeaturesRemoved( const QString&, const QgsFeatureIds& ) ),
this, SLOT( committedFeaturesRemoved( const QString&, const QgsFeatureIds& ) ) );
this, SLOT( committedFeaturesRemoved( const QString&, const QgsFeatureIds& ) ) );
disconnect( vLayer->editBuffer(), SIGNAL( committedAttributeValuesChanges( const QString&, const QgsChangedAttributesMap& ) ),
this, SLOT( committedAttributeValuesChanges( const QString&, const QgsChangedAttributesMap& ) ) );
this, SLOT( committedAttributeValuesChanges( const QString&, const QgsChangedAttributesMap& ) ) );
disconnect( vLayer->editBuffer(), SIGNAL( committedGeometriesChanges( const QString&, const QgsGeometryMap& ) ),
this, SLOT( committedGeometriesChanges( const QString&, const QgsGeometryMap& ) ) );
this, SLOT( committedGeometriesChanges( const QString&, const QgsGeometryMap& ) ) );
}

void QgsOfflineEditing::layerAdded( QgsMapLayer* layer )
@@ -1406,7 +1406,7 @@ void QgsPalLayerSettings::calculateLabelSize( const QFontMetricsF* fm, QString t

if ( wrapchr.isEmpty() )
{
wrapchr = QString( "\n" ); // default to new line delimeter
wrapchr = QString( "\n" ); // default to new line delimiter
}

//consider the space needed for the direction symbol
@@ -814,19 +814,19 @@ void QgsVectorLayer::invertSelection()

void QgsVectorLayer::selectAll()
{
QgsFeatureIterator fit = getFeatures( QgsFeatureRequest()
.setFlags( QgsFeatureRequest::NoGeometry )
.setSubsetOfAttributes( QgsAttributeList() ) );
QgsFeatureIterator fit = getFeatures( QgsFeatureRequest()
.setFlags( QgsFeatureRequest::NoGeometry )
.setSubsetOfAttributes( QgsAttributeList() ) );

QgsFeatureIds ids;
QgsFeatureIds ids;

QgsFeature fet;
while ( fit.nextFeature( fet ) )
{
ids << fet.id();
}
QgsFeature fet;
while ( fit.nextFeature( fet ) )
{
ids << fet.id();
}

setSelectedFeatures( ids );
setSelectedFeatures( ids );
}

void QgsVectorLayer::invertSelectionInRectangle( QgsRectangle & rect )
@@ -262,7 +262,7 @@ void QgsRasterProjector::calcSrcExtent()
// align extent to src resolution to avoid jumping of reprojected pixels
// when shifting resampled grid.
// Important especially if we are over mMaxSrcXRes, mMaxSrcYRes limits
// Note however, that preceeding filters (like resampler) may read data
// Note however, that preceding filters (like resampler) may read data
// on different resolution.

QgsDebugMsg( "mSrcExtent = " + mSrcExtent.toString() );
@@ -58,9 +58,9 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent )
registerItem( "Operators", "-", " -" , tr( "Subtraction operator" ) );
registerItem( "Operators", "*", " * ", tr( "Multiplication operator" ) );
registerItem( "Operators", "/", " / ", tr( "Division operator" ) );
registerItem( "Operators", "%", " % ", tr( "Modulo operator" ) );
registerItem( "Operators", "%", " % ", tr( "Modulo operator" ) );
registerItem( "Operators", "^", " ^ ", tr( "Power operator" ) );
registerItem( "Operators", "=", " = ", tr( "Equal operator" ) );
registerItem( "Operators", "=", " = ", tr( "Equal operator" ) );
registerItem( "Operators", ">", " > ", tr( "Greater as operator" ) );
registerItem( "Operators", "<", " < ", tr( "Less than operator" ) );
registerItem( "Operators", "<>", " <> ", tr( "Unequal operator" ) );
@@ -544,7 +544,7 @@ void QgsSingleBandPseudoColorRendererWidget::on_mColormapTreeWidget_itemDoubleCl
if ( column == 1 ) //change item color
{
item->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
QColor newColor = QColorDialog::getColor( item->background( column ).color(), this, "Change color", QColorDialog::ShowAlphaChannel );
QColor newColor = QColorDialog::getColor( item->background( column ).color(), this, "Change color", QColorDialog::ShowAlphaChannel );
if ( newColor.isValid() )
{
item->setBackground( 1, QBrush( newColor ) );
@@ -1222,7 +1222,7 @@ void QgsDelimitedTextProvider::fetchAttribute( QgsFeature& feature, int fieldIdx
}
else
{
dvalue = QString(value).replace( mDecimalPoint, "." ).toDouble( &ok );
dvalue = QString( value ).replace( mDecimalPoint, "." ).toDouble( &ok );
}
}
if ( ok )
@@ -169,7 +169,7 @@ def delimitedTextData( testname, filename, requests, verbose, **params ):
r( layer )
continue
rfields,rtypes, rdata = layerData(layer,r,nr*1000)
if len(rfields) > len(fields):
if len(rfields) > len(fields):
fields = rfields
fieldTypes=rtypes
data.update(rdata)

0 comments on commit ebc8e6c

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