Skip to content
Permalink
Browse files

indentation update

  • Loading branch information
jef-n committed Jan 18, 2014
1 parent ea48687 commit bf814c20d15a964c5c4037c8368db2069e41616f
@@ -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 );
@@ -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
{
@@ -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() ) );
}
}
}
@@ -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
@@ -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 );

@@ -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 *
@@ -19,9 +19,9 @@
#include "qgsmaptopixelgeometrysimplifier.h"

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

@@ -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;
@@ -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
@@ -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() );
}
@@ -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 *
@@ -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 );
}
@@ -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 )
{
}

@@ -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;
@@ -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 );
@@ -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;
@@ -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 );
@@ -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" )
@@ -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" )
@@ -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">

0 comments on commit bf814c2

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