Skip to content

Commit

Permalink
indentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jan 18, 2014
1 parent ea48687 commit bf814c2
Show file tree
Hide file tree
Showing 14 changed files with 596 additions and 603 deletions.
2 changes: 1 addition & 1 deletion src/core/composer/qgscomposershape.h
Expand Up @@ -68,7 +68,7 @@ class CORE_EXPORT QgsComposerShape: public QgsComposerItem
/**Returns the radius for rounded rectangle corners*/
double cornerRadius() const { return mCornerRadius; };

/**Sets the QgsFillSymbolV2 used to draw the shape. Must also call setUseSymbolV2( true ) to
/**Sets the QgsFillSymbolV2 used to draw the shape. Must also call setUseSymbolV2( true ) to
* enable drawing with a symbol.
* Note: added in version 2.1*/
void setShapeStyleSymbol( QgsFillSymbolV2* symbol );
Expand Down
2 changes: 1 addition & 1 deletion src/core/diagram/qgspiediagram.cpp
Expand Up @@ -38,7 +38,7 @@ QSizeF QgsPieDiagram::diagramSize( const QgsFeature& feature, const QgsRenderCon
if ( is.classificationAttributeIsExpression )
{
QgsExpression* expression = getExpression( is.classificationAttributeExpression, feature.fields() );
attrVal = expression->evaluate( feature );
attrVal = expression->evaluate( feature );
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/dxf/qgsdxfpallabeling.cpp
Expand Up @@ -91,7 +91,7 @@ void QgsDxfPalLabeling::drawLabel( pal::LabelPosition* label, QgsRenderContext&

for ( int i = 0; i < textList.size(); ++i )
{
mDxfExport->writeText( layerName, textList.at( i ), QgsPoint( label->getX(), label->getY() + ( textList.size() -1 - i ) * textHeight ), textAscent, angle, mDxfExport->closestColorMatch( tmpLyr.textColor.rgb() ) );
mDxfExport->writeText( layerName, textList.at( i ), QgsPoint( label->getX(), label->getY() + ( textList.size() - 1 - i ) * textHeight ), textAscent, angle, mDxfExport->closestColorMatch( tmpLyr.textColor.rgb() ) );
}
}
}
10 changes: 5 additions & 5 deletions src/core/qgis.cpp
Expand Up @@ -114,14 +114,14 @@ QString QGis::tr( QGis::UnitType unit )

double QGis::fromUnitToUnitFactor( QGis::UnitType fromUnit, QGis::UnitType toUnit )
{
#define DEGREE_TO_METER 111319.49079327358
#define FEET_TO_METER 0.3048
#define NMILE_TO_METER 1852.0
#define DEGREE_TO_METER 111319.49079327358
#define FEET_TO_METER 0.3048
#define NMILE_TO_METER 1852.0

// Unify degree units
if ( fromUnit == QGis::DecimalDegrees || fromUnit == QGis::DegreesMinutesSeconds || fromUnit == QGis::DegreesDecimalMinutes )
if ( fromUnit == QGis::DecimalDegrees || fromUnit == QGis::DegreesMinutesSeconds || fromUnit == QGis::DegreesDecimalMinutes )
fromUnit = QGis::Degrees;
if ( toUnit == QGis::DecimalDegrees || toUnit == QGis::DegreesMinutesSeconds || toUnit == QGis::DegreesDecimalMinutes )
if ( toUnit == QGis::DecimalDegrees || toUnit == QGis::DegreesMinutesSeconds || toUnit == QGis::DegreesDecimalMinutes )
toUnit = QGis::Degrees;

// Calculate the conversion factor between the specified units
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgscoordinatereferencesystem.cpp
Expand Up @@ -408,7 +408,7 @@ bool QgsCoordinateReferenceSystem::axisInverted() const
OSRGetAxis( mCRS, OSRIsGeographic( mCRS ) ? "GEOGCS" : "PROJCS", 0, &orientation );

// If axis orientation is unknown, try again with OSRImportFromEPSGA for EPSG crs
if( orientation == OAO_Other && mAuthId.startsWith( "EPSG:", Qt::CaseInsensitive ) )
if ( orientation == OAO_Other && mAuthId.startsWith( "EPSG:", Qt::CaseInsensitive ) )
{
OGRSpatialReferenceH crs = OSRNewSpatialReference( NULL );

Expand Down
15 changes: 7 additions & 8 deletions src/core/qgssimplifymethod.cpp
Expand Up @@ -3,7 +3,7 @@
---------------------
begin : December 2013
copyright : (C) 2013 by Matthias Kuhn / Alvaro Huarte
email :
email :
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
Expand All @@ -19,9 +19,9 @@
#include "qgsmaptopixelgeometrysimplifier.h"

QgsSimplifyMethod::QgsSimplifyMethod()
: mMethodType( QgsSimplifyMethod::NoSimplification )
, mTolerance( 1 )
, mForceLocalOptimization( true )
: mMethodType( QgsSimplifyMethod::NoSimplification )
, mTolerance( 1 )
, mForceLocalOptimization( true )
{
}

Expand All @@ -30,7 +30,7 @@ QgsSimplifyMethod::QgsSimplifyMethod( const QgsSimplifyMethod &rh )
operator=( rh );
}

QgsSimplifyMethod& QgsSimplifyMethod::operator=( const QgsSimplifyMethod &rh )
QgsSimplifyMethod& QgsSimplifyMethod::operator=( const QgsSimplifyMethod & rh )
{
mMethodType = rh.mMethodType;
mTolerance = rh.mTolerance;
Expand All @@ -53,7 +53,7 @@ void QgsSimplifyMethod::setForceLocalOptimization( bool localOptimization )
{
mForceLocalOptimization = localOptimization;
}

double QgsSimplifyMethod::toleranceForDouglasPeuckerAlgorithms() const
{
//TODO: define more precise value, now, it is experimental but conservative
Expand All @@ -70,8 +70,7 @@ QgsAbstractGeometrySimplifier* QgsSimplifyMethod::createGeometrySimplifier( cons
int simplifyFlags = QgsMapToPixelSimplifier::SimplifyGeometry | QgsMapToPixelSimplifier::SimplifyEnvelope;
return new QgsMapToPixelSimplifier( simplifyFlags, simplifyMethod.tolerance() );
}
else
if ( methodType == QgsSimplifyMethod::PreserveTopology )
else if ( methodType == QgsSimplifyMethod::PreserveTopology )
{
return new QgsTopologyPreservingSimplifier( simplifyMethod.tolerance() );
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgssimplifymethod.h
Expand Up @@ -3,7 +3,7 @@
---------------------
begin : December 2013
copyright : (C) 2013 by Matthias Kuhn / Alvaro Huarte
email :
email :
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
Expand Down
3 changes: 1 addition & 2 deletions src/core/qgsvectorlayerfeatureiterator.cpp
Expand Up @@ -475,8 +475,7 @@ bool QgsVectorLayerFeatureIterator::providerCanSimplify( QgsSimplifyMethod::Meth
{
return ( capabilities & QgsVectorDataProvider::SimplifyGeometries );
}
else
if ( methodType == QgsSimplifyMethod::PreserveTopology )
else if ( methodType == QgsSimplifyMethod::PreserveTopology )
{
return ( capabilities & QgsVectorDataProvider::SimplifyGeometriesWithTopologicalValidation );
}
Expand Down
8 changes: 4 additions & 4 deletions src/core/qgsvectorsimplifymethod.cpp
Expand Up @@ -18,9 +18,9 @@
#include "qgsvectorlayer.h"

QgsVectorSimplifyMethod::QgsVectorSimplifyMethod()
: mSimplifyHints( QGis::DEFAULT_MAPTOPIXEL_THRESHOLD > 1 ? QgsVectorLayer::FullSimplification : QgsVectorLayer::GeometrySimplification )
, mThreshold( QGis::DEFAULT_MAPTOPIXEL_THRESHOLD )
, mLocalOptimization( true )
: mSimplifyHints( QGis::DEFAULT_MAPTOPIXEL_THRESHOLD > 1 ? QgsVectorLayer::FullSimplification : QgsVectorLayer::GeometrySimplification )
, mThreshold( QGis::DEFAULT_MAPTOPIXEL_THRESHOLD )
, mLocalOptimization( true )
{
}

Expand All @@ -29,7 +29,7 @@ QgsVectorSimplifyMethod::QgsVectorSimplifyMethod( const QgsVectorSimplifyMethod
operator=( rh );
}

QgsVectorSimplifyMethod& QgsVectorSimplifyMethod::operator=( const QgsVectorSimplifyMethod &rh )
QgsVectorSimplifyMethod& QgsVectorSimplifyMethod::operator=( const QgsVectorSimplifyMethod & rh )
{
mSimplifyHints = rh.mSimplifyHints;
mThreshold = rh.mThreshold;
Expand Down
8 changes: 4 additions & 4 deletions src/core/symbology-ng/qgssymbollayerv2utils.cpp
Expand Up @@ -1921,8 +1921,8 @@ bool QgsSymbolLayerV2Utils::externalMarkerFromSld( QDomElement &element,
return true;
}

void QgsSymbolLayerV2Utils::wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element,
QString name, QColor color, QColor borderColor,
void QgsSymbolLayerV2Utils::wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element,
QString name, QColor color, QColor borderColor,
double borderWidth, double size )
{
wellKnownMarkerToSld( doc, element, name, color, borderColor, Qt::SolidLine, borderWidth, size );
Expand Down Expand Up @@ -1964,8 +1964,8 @@ void QgsSymbolLayerV2Utils::wellKnownMarkerToSld( QDomDocument &doc, QDomElement
}
}

bool QgsSymbolLayerV2Utils::wellKnownMarkerFromSld( QDomElement &element,
QString &name, QColor &color, QColor &borderColor,
bool QgsSymbolLayerV2Utils::wellKnownMarkerFromSld( QDomElement &element,
QString &name, QColor &color, QColor &borderColor,
double &borderWidth, double &size )
{
Qt::PenStyle borderStyle;
Expand Down
8 changes: 4 additions & 4 deletions src/core/symbology-ng/qgssymbollayerv2utils.h
Expand Up @@ -151,15 +151,15 @@ class CORE_EXPORT QgsSymbolLayerV2Utils

/** @deprecated Use wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element, QString name, QColor color, QColor borderColor, Qt::PenStyle borderStyle, double borderWidth, double size ) instead */
Q_DECL_DEPRECATED static void wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element,
QString name, QColor color, QColor borderColor = QColor(),
double borderWidth = -1, double size = -1 );
QString name, QColor color, QColor borderColor = QColor(),
double borderWidth = -1, double size = -1 );
static void wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element,
QString name, QColor color, QColor borderColor, Qt::PenStyle borderStyle,
double borderWidth = -1, double size = -1 );
/** @deprecated Use wellKnownMarkerFromSld( QDomElement &element, QString &name, QColor &color, QColor &borderColor, Qt::PenStyle &borderStyle, double &borderWidth, double &size ) instead */
Q_DECL_DEPRECATED static bool wellKnownMarkerFromSld( QDomElement &element,
QString &name, QColor &color, QColor &borderColor,
double &borderWidth, double &size );
QString &name, QColor &color, QColor &borderColor,
double &borderWidth, double &size );
static bool wellKnownMarkerFromSld( QDomElement &element,
QString &name, QColor &color, QColor &borderColor, Qt::PenStyle &borderStyle,
double &borderWidth, double &size );
Expand Down
21 changes: 8 additions & 13 deletions src/providers/postgres/qgspostgresfeatureiterator.cpp
Expand Up @@ -301,17 +301,13 @@ bool QgsPostgresFeatureIterator::declareCursor( const QString& whereClause )

if ( mFetchGeometry && !simplifyMethod.forceLocalOptimization() && simplifyMethod.methodType() != QgsSimplifyMethod::NoSimplification && QGis::flatType( QGis::singleType( P->geometryType() ) ) != QGis::WKBPoint )
{
QString simplifyFunctionName = simplifyMethod.methodType() == QgsSimplifyMethod::OptimizeForRendering
?
( P->mConnectionRO->majorVersion() < 2 ? "simplify" : "st_simplify" )
:
( P->mConnectionRO->majorVersion() < 2 ? "simplifypreservetopology" : "st_simplifypreservetopology" );

double tolerance = simplifyMethod.methodType() == QgsSimplifyMethod::OptimizeForRendering
?
simplifyMethod.toleranceForDouglasPeuckerAlgorithms()
:
simplifyMethod.tolerance();
QString simplifyFunctionName = simplifyMethod.methodType() == QgsSimplifyMethod::OptimizeForRendering
? ( P->mConnectionRO->majorVersion() < 2 ? "simplify" : "st_simplify" )
: ( P->mConnectionRO->majorVersion() < 2 ? "simplifypreservetopology" : "st_simplifypreservetopology" );

double tolerance = simplifyMethod.methodType() == QgsSimplifyMethod::OptimizeForRendering
? simplifyMethod.toleranceForDouglasPeuckerAlgorithms()
: simplifyMethod.tolerance();

query += QString( "%1(%5(%2%3,%6),'%4')" )
.arg( P->mConnectionRO->majorVersion() < 2 ? "asbinary" : "st_asbinary" )
Expand All @@ -322,8 +318,7 @@ bool QgsPostgresFeatureIterator::declareCursor( const QString& whereClause )
.arg( tolerance );
delim = ",";
}
else
if ( mFetchGeometry )
else if ( mFetchGeometry )
{
query += QString( "%1(%2%3,'%4')" )
.arg( P->mConnectionRO->majorVersion() < 2 ? "asbinary" : "st_asbinary" )
Expand Down
2 changes: 1 addition & 1 deletion src/ui/qgsdualviewbase.ui
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QgsDualViewBase</class>
<widget class="QStackedWidget" name="QgsDualViewBase">
Expand Down

0 comments on commit bf814c2

Please sign in to comment.