Skip to content
Permalink
Browse files

indentation update

  • Loading branch information
jef-n committed May 7, 2015
1 parent b91cbee commit da69e0f842fc8f0655020c5226650e24db6c0afd
@@ -32,8 +32,8 @@
#endif

QgsNewOgrConnection::QgsNewOgrConnection( QWidget *parent, const QString& connType, const QString& connName, Qt::WindowFlags fl )
: QDialog( parent, fl ),
mOriginalConnName( connName )
: QDialog( parent, fl )
, mOriginalConnName( connName )
{
setupUi( this );

@@ -147,34 +147,34 @@ void QgsComposition::init()

/*
QgsComposition::QgsComposition()
: QGraphicsScene( 0 ),
mMapRenderer( 0 ),
mPlotStyle( QgsComposition::Preview ),
mPageWidth( 297 ),
mPageHeight( 210 ),
mSpaceBetweenPages( 10 ),
mPageStyleSymbol( 0 ),
mPrintAsRaster( false ),
mGenerateWorldFile( false ),
mWorldFileMap( 0 ),
mUseAdvancedEffects( true ),
mSnapToGrid( false ),
mGridVisible( false ),
mSnapGridResolution( 0 ),
mSnapGridTolerance( 0 ),
mSnapGridOffsetX( 0 ),
mSnapGridOffsetY( 0 ),
mAlignmentSnap( true ),
mGuidesVisible( true ),
mSmartGuides( true ),
mAlignmentSnapTolerance( 0 ),
mSelectionHandles( 0 ),
mActiveItemCommand( 0 ),
mActiveMultiFrameCommand( 0 ),
mAtlasComposition( this ),
mAtlasMode( QgsComposition::AtlasOff ),
mPreventCursorChange( false ),
mItemsModel( 0 )
: QGraphicsScene( 0 )
, mMapRenderer( 0 )
, mPlotStyle( QgsComposition::Preview )
, mPageWidth( 297 )
, mPageHeight( 210 )
, mSpaceBetweenPages( 10 )
, mPageStyleSymbol( 0 )
, mPrintAsRaster( false )
, mGenerateWorldFile( false )
, mWorldFileMap( 0 )
, mUseAdvancedEffects( true )
, mSnapToGrid( false )
, mGridVisible( false )
, mSnapGridResolution( 0 )
, mSnapGridTolerance( 0 )
, mSnapGridOffsetX( 0 )
, mSnapGridOffsetY( 0 )
, mAlignmentSnap( true )
, mGuidesVisible( true )
, mSmartGuides( true )
, mAlignmentSnapTolerance( 0 )
, mSelectionHandles( 0 )
, mActiveItemCommand( 0 )
, mActiveMultiFrameCommand( 0 )
, mAtlasComposition( this )
, mAtlasMode( QgsComposition::AtlasOff )
, mPreventCursorChange( false )
, mItemsModel( 0 )
{
//load default composition settings
loadDefaults();
@@ -23,15 +23,15 @@
#include <QtCore/QPointer>

#if defined(HAVE_QT_MOBILITY_LOCATION )
#include <QtLocation/QGeoPositionInfoSource>
#include <QtLocation/QGeoSatelliteInfo>
#include <QtLocation/QGeoSatelliteInfoSource>
#include <QtLocation/QGeoPositionInfoSource>
#include <QtLocation/QGeoSatelliteInfo>
#include <QtLocation/QGeoSatelliteInfoSource>

QTM_USE_NAMESPACE
QTM_USE_NAMESPACE
#else // Using QtPositioning
#include <QtPositioning/QGeoPositionInfoSource>
#include <QtPositioning/QGeoSatelliteInfo>
#include <QtPositioning/QGeoSatelliteInfoSource>
#include <QtPositioning/QGeoPositionInfoSource>
#include <QtPositioning/QGeoSatelliteInfo>
#include <QtPositioning/QGeoSatelliteInfoSource>
#endif

class CORE_EXPORT QgsQtLocationConnection: public QgsGPSConnection
@@ -55,8 +55,19 @@
namespace pal
{
LabelPosition::LabelPosition( int id, double x1, double y1, double w, double h, double alpha, double cost, FeaturePart *feature, bool isReversed, Quadrant quadrant )
: id( id ), cost( cost ), feature( feature ), probFeat( 0 ), nbOverlap( 0 ), alpha( alpha ), w( w ), h( h ), nextPart( NULL ), partId( -1 ), reversed( isReversed ), upsideDown( false ),
quadrant( quadrant )
: id( id )
, cost( cost )
, feature( feature )
, probFeat( 0 )
, nbOverlap( 0 )
, alpha( alpha )
, w( w )
, h( h )
, nextPart( NULL )
, partId( -1 )
, reversed( isReversed )
, upsideDown( false )
, quadrant( quadrant )
{

// alpha take his value bw 0 and 2*pi rad
@@ -59,11 +59,20 @@ namespace pal
{

Layer::Layer( const char *lyrName, double min_scale, double max_scale, Arrangement arrangement, Units label_unit, double defaultPriority, bool obstacle, bool active, bool toLabel, Pal *pal, bool displayAll )
: pal( pal ), obstacle( obstacle ), active( active ),
toLabel( toLabel ), displayAll( displayAll ), centroidInside( false ), label_unit( label_unit ),
min_scale( min_scale ), max_scale( max_scale ),
arrangement( arrangement ), arrangementFlags( 0 ), mode( LabelPerFeature ), mergeLines( false ),
upsidedownLabels( Upright )
: pal( pal )
, obstacle( obstacle )
, active( active )
, toLabel( toLabel )
, displayAll( displayAll )
, centroidInside( false )
, label_unit( label_unit )
, min_scale( min_scale )
, max_scale( max_scale )
, arrangement( arrangement )
, arrangementFlags( 0 )
, mode( LabelPerFeature )
, mergeLines( false )
, upsidedownLabels( Upright )
{

this->name = new char[strlen( lyrName ) +1];
@@ -45,9 +45,9 @@
#endif

QgsLabel::QgsLabel( const QgsFields & fields )
: mMinScale( 0 ),
mMaxScale( 100000000 ),
mScaleBasedVisibility( false )
: mMinScale( 0 )
, mMaxScale( 100000000 )
, mScaleBasedVisibility( false )
{
mFields = fields;
mLabelFieldIdx.resize( LabelFieldCount );
@@ -1946,12 +1946,12 @@ QDomElement QgsOgcUtils::expressionUnaryOperatorToOgcFilter( const QgsExpression
// operand expression already created a Literal node:
// take the literal value, prepend - and remove old literal node
uoElem.appendChild( doc.createTextNode( "-" + operandElem.text() ) );
doc.removeChild(operandElem);
doc.removeChild( operandElem );
}
else
{
errorMessage = QString( "This use of unary operator not implemented yet" );
return QDomElement();
errorMessage = QString( "This use of unary operator not implemented yet" );
return QDomElement();
}
break;
case QgsExpression::uoNot:
@@ -20,8 +20,8 @@
#include "qgis.h"

QgsProviderCountCalcEvent::QgsProviderCountCalcEvent( long featuresCounted )
: QEvent( static_cast<QEvent::Type>( QGis::ProviderCountCalcEvent ) ),
n( featuresCounted )
: QEvent( static_cast<QEvent::Type>( QGis::ProviderCountCalcEvent ) )
, n( featuresCounted )
{
// NO-OP
}
@@ -20,8 +20,8 @@
#include "qgis.h"

QgsProviderExtentCalcEvent::QgsProviderExtentCalcEvent( QgsRectangle* layerExtent )
: QEvent( static_cast<QEvent::Type>( QGis::ProviderExtentCalcEvent ) ),
le( layerExtent )
: QEvent( static_cast<QEvent::Type>( QGis::ProviderExtentCalcEvent ) )
, le( layerExtent )
{
// NO-OP
}
@@ -23,9 +23,9 @@
QgsProviderMetadata::QgsProviderMetadata( QString const & _key,
QString const & _description,
QString const & _library )
: key_( _key ),
description_( _description ),
library_( _library )
: key_( _key )
, description_( _description )
, library_( _library )
{}

QString const & QgsProviderMetadata::key() const
@@ -21,18 +21,18 @@
#include "qgsmapsettings.h"

QgsRenderContext::QgsRenderContext()
: mPainter( 0 ),
mCoordTransform( 0 ),
mDrawEditingInformation( true ),
mForceVectorOutput( false ),
mUseAdvancedEffects( true ),
mRenderingStopped( false ),
mScaleFactor( 1.0 ),
mRasterScaleFactor( 1.0 ),
mRendererScale( 1.0 ),
mLabelingEngine( NULL ),
mShowSelection( true ),
mUseRenderingOptimization( true )
: mPainter( 0 )
, mCoordTransform( 0 )
, mDrawEditingInformation( true )
, mForceVectorOutput( false )
, mUseAdvancedEffects( true )
, mRenderingStopped( false )
, mScaleFactor( 1.0 )
, mRasterScaleFactor( 1.0 )
, mRendererScale( 1.0 )
, mLabelingEngine( NULL )
, mShowSelection( true )
, mUseRenderingOptimization( true )
{
mVectorSimplifyMethod.setSimplifyHints( QgsVectorSimplifyMethod::NoSimplification );
}
@@ -23,9 +23,9 @@
#include <QDomElement>

QgsBrightnessContrastFilter::QgsBrightnessContrastFilter( QgsRasterInterface* input )
: QgsRasterInterface( input ),
mBrightness( 0 ),
mContrast( 0 )
: QgsRasterInterface( input )
, mBrightness( 0 )
, mContrast( 0 )
{
}

@@ -23,15 +23,15 @@


QgsHueSaturationFilter::QgsHueSaturationFilter( QgsRasterInterface* input )
: QgsRasterInterface( input ),
mSaturation( 0 ),
mSaturationScale( 1 ),
mGrayscaleMode( QgsHueSaturationFilter::GrayscaleOff ),
mColorizeOn( false ),
mColorizeColor( QColor::fromRgb( 255, 128, 128 ) ),
mColorizeH( 0 ),
mColorizeS( 50 ),
mColorizeStrength( 100 )
: QgsRasterInterface( input )
, mSaturation( 0 )
, mSaturationScale( 1 )
, mGrayscaleMode( QgsHueSaturationFilter::GrayscaleOff )
, mColorizeOn( false )
, mColorizeColor( QColor::fromRgb( 255, 128, 128 ) )
, mColorizeH( 0 )
, mColorizeS( 50 )
, mColorizeStrength( 100 )
{
}

@@ -33,9 +33,10 @@
#include <QPainter>

QgsRasterResampleFilter::QgsRasterResampleFilter( QgsRasterInterface* input )
: QgsRasterInterface( input ),
mZoomedInResampler( 0 ), mZoomedOutResampler( 0 ),
mMaxOversampling( 2.0 )
: QgsRasterInterface( input )
, mZoomedInResampler( 0 )
, mZoomedOutResampler( 0 )
, mMaxOversampling( 2.0 )
{
}

@@ -43,7 +43,8 @@ QMap< QString, QgsCptCityArchive* > QgsCptCityArchive::archiveRegistry() { retur
QMap< QString, QMap< QString, QString > > QgsCptCityArchive::mCopyingInfoMap;

QgsCptCityArchive::QgsCptCityArchive( QString archiveName, QString baseDir )
: mArchiveName( archiveName ), mBaseDir( baseDir )
: mArchiveName( archiveName )
, mBaseDir( baseDir )
{
QgsDebugMsg( "archiveName = " + archiveName + " baseDir = " + baseDir );

@@ -496,8 +497,9 @@ void QgsCptCityArchive::clearArchives()
QgsCptCityDataItem::QgsCptCityDataItem( QgsCptCityDataItem::Type type, QgsCptCityDataItem* parent,
QString name, QString path )
// Do not pass parent to QObject, Qt would delete this when parent is deleted
: QObject(), mType( type ), mParent( parent ), mPopulated( false ),
mName( name ), mPath( path ), mValid( true )
: QObject()
, mType( type ), mParent( parent ), mPopulated( false )
, mName( name ), mPath( path ), mValid( true )
{
}

@@ -709,8 +711,9 @@ bool QgsCptCityDataItem::equal( const QgsCptCityDataItem *other )

QgsCptCityColorRampItem::QgsCptCityColorRampItem( QgsCptCityDataItem* parent,
QString name, QString path, QString variantName, bool initialize )
: QgsCptCityDataItem( ColorRamp, parent, name, path ),
mInitialised( false ), mRamp( path, variantName, false )
: QgsCptCityDataItem( ColorRamp, parent, name, path )
, mInitialised( false )
, mRamp( path, variantName, false )
{
// QgsDebugMsg( "name= " + name + " path= " + path );
mPopulated = true;
@@ -720,8 +723,9 @@ QgsCptCityColorRampItem::QgsCptCityColorRampItem( QgsCptCityDataItem* parent,

QgsCptCityColorRampItem::QgsCptCityColorRampItem( QgsCptCityDataItem* parent,
QString name, QString path, QStringList variantList, bool initialize )
: QgsCptCityDataItem( ColorRamp, parent, name, path ),
mInitialised( false ), mRamp( path, variantList, QString(), false )
: QgsCptCityDataItem( ColorRamp, parent, name, path )
, mInitialised( false )
, mRamp( path, variantList, QString(), false )
{
// QgsDebugMsg( "name= " + name + " path= " + path );
mPopulated = true;
@@ -836,7 +840,8 @@ QIcon QgsCptCityColorRampItem::icon( const QSize& size )
// ---------------------------------------------------------------------
QgsCptCityCollectionItem::QgsCptCityCollectionItem( QgsCptCityDataItem* parent,
QString name, QString path )
: QgsCptCityDataItem( Collection, parent, name, path ), mPopulatedRamps( false )
: QgsCptCityDataItem( Collection, parent, name, path )
, mPopulatedRamps( false )
{
}

@@ -495,10 +495,10 @@ void QgsSimpleMarkerSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV
double angle = mAngle;
if ( hasDataDefinedProperty( "angle" ) )
{
angle = evaluateDataDefinedProperty("angle", context.feature() ).toDouble();
angle = evaluateDataDefinedProperty( "angle", context.feature() ).toDouble();
}

bool hasDataDefinedRotation = context.renderHints() & QgsSymbolV2::DataDefinedRotation || hasDataDefinedProperty("angle");
bool hasDataDefinedRotation = context.renderHints() & QgsSymbolV2::DataDefinedRotation || hasDataDefinedProperty( "angle" );
if ( hasDataDefinedRotation )
{
// For non-point markers, "dataDefinedRotation" means following the
@@ -523,9 +523,9 @@ void QgsSimpleMarkerSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV

//data defined shape?
bool createdNewPath = false;
if ( hasDataDefinedProperty("name") )
if ( hasDataDefinedProperty( "name" ) )
{
QString name = evaluateDataDefinedProperty("name", context.feature() ).toString();
QString name = evaluateDataDefinedProperty( "name", context.feature() ).toString();
if ( !prepareShape( name ) ) // drawing as a polygon
{
preparePath( name ); // drawing as a painter path

0 comments on commit da69e0f

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