Skip to content

Commit c254be1

Browse files
committed
indentation update
1 parent 4571b1d commit c254be1

20 files changed

+220
-217
lines changed

src/app/qgsmaptoolsvgannotation.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ QgsMapToolSvgAnnotation::~QgsMapToolSvgAnnotation()
3131

3232
QgsAnnotationItem* QgsMapToolSvgAnnotation::createItem( QMouseEvent* e )
3333
{
34-
QgsSvgAnnotationItem* svgItem = new QgsSvgAnnotationItem( mCanvas );
35-
svgItem->setMapPosition( toMapCoordinates( e->pos() ) );
36-
svgItem->setSelected( true );
37-
svgItem->setFrameSize( QSizeF( 200, 100 ) );
38-
return svgItem;
34+
QgsSvgAnnotationItem* svgItem = new QgsSvgAnnotationItem( mCanvas );
35+
svgItem->setMapPosition( toMapCoordinates( e->pos() ) );
36+
svgItem->setSelected( true );
37+
svgItem->setFrameSize( QSizeF( 200, 100 ) );
38+
return svgItem;
3939
}

src/app/qgsmaptoolsvgannotation.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222

2323
class QgsMapToolSvgAnnotation: public QgsMapToolAnnotation
2424
{
25-
public:
26-
QgsMapToolSvgAnnotation( QgsMapCanvas* canvas );
27-
~QgsMapToolSvgAnnotation();
28-
protected:
29-
QgsAnnotationItem* createItem( QMouseEvent* e );
25+
public:
26+
QgsMapToolSvgAnnotation( QgsMapCanvas* canvas );
27+
~QgsMapToolSvgAnnotation();
28+
protected:
29+
QgsAnnotationItem* createItem( QMouseEvent* e );
3030
};
3131

3232
#endif // QGSMAPTOOLSVGANNOTATION_H

src/app/qgssvgannotationdialog.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ class QgsAnnotationWidget;
2626
class QgsSvgAnnotationDialog: public QDialog, private Ui::QgsFormAnnotationDialogBase
2727
{
2828
Q_OBJECT
29-
public:
30-
QgsSvgAnnotationDialog( QgsSvgAnnotationItem* item, QWidget * parent = 0, Qt::WindowFlags f = 0);
31-
~QgsSvgAnnotationDialog();
29+
public:
30+
QgsSvgAnnotationDialog( QgsSvgAnnotationItem* item, QWidget * parent = 0, Qt::WindowFlags f = 0 );
31+
~QgsSvgAnnotationDialog();
3232

33-
private slots:
34-
void on_mBrowseToolButton_clicked();
35-
void applySettingsToItem();
36-
void deleteItem();
33+
private slots:
34+
void on_mBrowseToolButton_clicked();
35+
void applySettingsToItem();
36+
void deleteItem();
3737

38-
private:
39-
QgsSvgAnnotationDialog(); //forbidden
38+
private:
39+
QgsSvgAnnotationDialog(); //forbidden
4040

41-
QgsSvgAnnotationItem* mItem;
42-
QgsAnnotationWidget* mEmbeddedWidget;
41+
QgsSvgAnnotationItem* mItem;
42+
QgsAnnotationWidget* mEmbeddedWidget;
4343
};
4444

4545
#endif // QGSSVGANNOTATIONDIALOG_H

src/core/qgsexpression.cpp

+11-10
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ static QgsExpression::Interval getInterval( const QVariant& value, QgsExpression
329329

330330
return QgsExpression::Interval::invalidInterVal();
331331
}
332-
static QgsGeometry getGeometry( const QVariant& value, QgsExpression* parent)
332+
static QgsGeometry getGeometry( const QVariant& value, QgsExpression* parent )
333333
{
334334
if ( value.canConvert<QgsGeometry>() )
335335
return value.value<QgsGeometry>();
@@ -775,7 +775,7 @@ static QVariant fcnGeometry( const QVariantList& , QgsFeature* f, QgsExpression*
775775
}
776776
static QVariant fcnGeomFromWKT( const QVariantList& values, QgsFeature*, QgsExpression* parent )
777777
{
778-
QString wkt = getStringValue( values.at( 0 ), parent );
778+
QString wkt = getStringValue( values.at( 0 ), parent );
779779
QgsGeometry* geom = QgsGeometry::fromWkt( wkt );
780780
if ( geom )
781781
return QVariant::fromValue( *geom );
@@ -786,7 +786,7 @@ static QVariant fcnGeomFromGML2( const QVariantList& values, QgsFeature*, QgsExp
786786
{
787787
QDomDocument doc;
788788
QString errorMsg;
789-
QString gml = getStringValue( values.at( 0 ), parent );
789+
QString gml = getStringValue( values.at( 0 ), parent );
790790
if ( !doc.setContent( gml, true, &errorMsg ) )
791791
return QVariant();
792792

@@ -879,7 +879,7 @@ static QVariant fcnBuffer( const QVariantList& values, QgsFeature*, QgsExpressio
879879
return QVariant();
880880

881881
QgsGeometry fGeom = getGeometry( values.at( 0 ), parent );
882-
double dist = getDoubleValue( values.at( 1 ), parent );
882+
double dist = getDoubleValue( values.at( 1 ), parent );
883883
int seg = 8;
884884
if ( values.length() == 3 )
885885
seg = getIntValue( values.at( 2 ), parent );
@@ -1033,7 +1033,7 @@ const QStringList &QgsExpression::BuiltinFunctions()
10331033
{
10341034
gmBuiltinFunctions << "sqrt"
10351035
<< "sqrt" << "cos" << "sin" << "tan"
1036-
<< "asin" << "acos" << "atan" << "atan2"
1036+
<< "asin" << "acos" << "atan" << "atan2"
10371037
<< "exp" << "ln" << "log10" << "log"
10381038
<< "round" << "toint" << "toreal" << "tostring"
10391039
<< "todatetime" << "todate" << "totime" << "tointerval"
@@ -2254,7 +2254,7 @@ void QgsExpression::NodeFunction::toOgcFilter( QDomDocument &doc, QDomElement &e
22542254
if ( fd->name() == ogcOperatorName.toLower() )
22552255
{
22562256
isSpatial = true;
2257-
QDomElement funcElem = doc.createElement( "ogc:"+ogcOperatorName );
2257+
QDomElement funcElem = doc.createElement( "ogc:" + ogcOperatorName );
22582258
QDomElement geomProperty = doc.createElement( "ogc:PropertyName" );
22592259
geomProperty.appendChild( doc.createTextNode( "geometry" ) );
22602260
funcElem.appendChild( geomProperty );
@@ -2279,14 +2279,14 @@ void QgsExpression::NodeFunction::toOgcFilter( QDomDocument &doc, QDomElement &e
22792279
{
22802280
QDomDocument geomDoc;
22812281
QString errorMsg;
2282-
QString gml = childElem.firstChildElement().text();
2282+
QString gml = childElem.firstChildElement().text();
22832283
if ( geomDoc.setContent( gml, true, &errorMsg ) )
22842284
funcElem.appendChild( doc.documentElement() );
22852285
}
22862286
}
22872287
childElem = childElem.nextSiblingElement();
22882288
}
2289-
2289+
22902290
element.appendChild( funcElem );
22912291
}
22922292
}
@@ -2329,7 +2329,7 @@ QgsExpression::Node* QgsExpression::NodeFunction::createFromOgcFilter( QDomEleme
23292329
opeIdx = j;
23302330
}
23312331

2332-
if (geomIdx == 0 || gml2Idx == 0 || opeIdx == 0 )
2332+
if ( geomIdx == 0 || gml2Idx == 0 || opeIdx == 0 )
23332333
{
23342334
errorMessage = QString( "spatial functions not find %1, got %2, %3, %4" ).arg( ogcOperatorName ).arg( geomIdx ).arg( gml2Idx ).arg( opeIdx );
23352335
return NULL;
@@ -2338,7 +2338,8 @@ QgsExpression::Node* QgsExpression::NodeFunction::createFromOgcFilter( QDomEleme
23382338
QgsExpression::NodeList *gml2Args = new QgsExpression::NodeList();
23392339
QDomElement childElem = element.firstChildElement();
23402340
QString gml2Str = "";
2341-
while ( !childElem.isNull() && gml2Str == "" ) {
2341+
while ( !childElem.isNull() && gml2Str == "" )
2342+
{
23422343
if ( childElem.tagName() != "PropertyName" )
23432344
{
23442345
QTextStream gml2Stream( &gml2Str );

src/core/qgsexpression.h

+38-38
Original file line numberDiff line numberDiff line change
@@ -227,61 +227,61 @@ class CORE_EXPORT QgsExpression
227227
class CORE_EXPORT Function
228228
{
229229
public:
230-
Function( QString fnname, int params, QString group, QString helpText = QString(), bool usesGeometry = false )
231-
: mName( fnname ), mParams( params ), mUsesGeometry( usesGeometry ), mGroup( group ), mHelpText( helpText ) {}
232-
/** The name of the function. */
233-
QString name() { return mName; }
234-
/** The number of parameters this function takes. */
235-
int params() { return mParams; }
236-
/** Does this function use a geometry object. */
237-
bool usesgeometry() { return mUsesGeometry; }
238-
/** The group the function belongs to. */
239-
QString group() { return mGroup; }
240-
/** The help text for the function. */
241-
QString helptext() { return mHelpText; }
242-
243-
virtual QVariant func(const QVariantList& values, QgsFeature* f, QgsExpression* parent) = 0;
244-
245-
bool operator==(const Function& other) const
246-
{
247-
if ( QString::compare( mName, other.mName, Qt::CaseInsensitive ) == 0 )
248-
return true;
249-
250-
return false;
251-
}
252-
253-
private:
254-
QString mName;
255-
int mParams;
256-
bool mUsesGeometry;
257-
QString mGroup;
258-
QString mHelpText;
230+
Function( QString fnname, int params, QString group, QString helpText = QString(), bool usesGeometry = false )
231+
: mName( fnname ), mParams( params ), mUsesGeometry( usesGeometry ), mGroup( group ), mHelpText( helpText ) {}
232+
/** The name of the function. */
233+
QString name() { return mName; }
234+
/** The number of parameters this function takes. */
235+
int params() { return mParams; }
236+
/** Does this function use a geometry object. */
237+
bool usesgeometry() { return mUsesGeometry; }
238+
/** The group the function belongs to. */
239+
QString group() { return mGroup; }
240+
/** The help text for the function. */
241+
QString helptext() { return mHelpText; }
242+
243+
virtual QVariant func( const QVariantList& values, QgsFeature* f, QgsExpression* parent ) = 0;
244+
245+
bool operator==( const Function& other ) const
246+
{
247+
if ( QString::compare( mName, other.mName, Qt::CaseInsensitive ) == 0 )
248+
return true;
249+
250+
return false;
251+
}
252+
253+
private:
254+
QString mName;
255+
int mParams;
256+
bool mUsesGeometry;
257+
QString mGroup;
258+
QString mHelpText;
259259
};
260260

261261
class StaticFunction : public Function
262262
{
263263
public:
264264
StaticFunction( QString fnname, int params, FcnEval fcn, QString group, QString helpText = QString(), bool usesGeometry = false )
265-
: Function( fnname, params, group, helpText, usesGeometry), mFnc( fcn ) {}
265+
: Function( fnname, params, group, helpText, usesGeometry ), mFnc( fcn ) {}
266266

267-
virtual QVariant func(const QVariantList& values, QgsFeature* f, QgsExpression* parent)
268-
{
269-
return mFnc(values,f, parent);
270-
}
267+
virtual QVariant func( const QVariantList& values, QgsFeature* f, QgsExpression* parent )
268+
{
269+
return mFnc( values, f, parent );
270+
}
271271

272272
private:
273273
FcnEval mFnc;
274274
};
275275

276276
const static QList<Function*> &Functions();
277277
static QList<Function*> gmFunctions;
278-
278+
279279
static QStringList gmBuiltinFunctions;
280280
const static QStringList &BuiltinFunctions();
281281

282-
static bool registerFunction(Function* function);
283-
static bool unregisterFunction(QString name);
284-
282+
static bool registerFunction( Function* function );
283+
static bool unregisterFunction( QString name );
284+
285285
// tells whether the identifier is a name of existing function
286286
static bool isFunctionName( QString name );
287287

src/core/qgsgeometry.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2985,7 +2985,7 @@ double QgsGeometry::closestVertexWithContext( const QgsPoint& point, int& atVert
29852985

29862986
if ( !mGeos )
29872987
{
2988-
return -1;
2988+
return -1;
29892989
}
29902990

29912991
const GEOSGeometry *g = GEOSGetExteriorRing( mGeos );
@@ -3290,7 +3290,7 @@ int QgsGeometry::addRing( const QList<QgsPoint>& ring )
32903290

32913291
if ( !mGeos )
32923292
{
3293-
return 6;
3293+
return 6;
32943294
}
32953295

32963296
int type = GEOSGeomTypeId( mGeos );

src/core/qgsvectorfilewriter.h

+13-13
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,19 @@ class CORE_EXPORT QgsVectorFileWriter
7070

7171
/** Write contents of vector layer to an (OGR supported) vector formt
7272
@note: this method was added in version 1.5
73-
@param layer layer to write
74-
@param fileName file name to write to
75-
@param fileEncoding encoding to use
76-
@param destCRS pointer to CRS to reproject exported geometries to
77-
@param driverName OGR driver to use
78-
@param onlySelected write only selected features of layer
79-
@param errorMessage pointer to buffer fo error message
80-
@param datasourceOptions list of OGR data source creation options
81-
@param layerOptions list of OGR layer creation options
82-
@param skipAttributeCreation only write geometries
83-
@param newFilename QString pointer which will contain the new file name created
84-
(in case it is different to fileName).
85-
*/
73+
@param layer layer to write
74+
@param fileName file name to write to
75+
@param fileEncoding encoding to use
76+
@param destCRS pointer to CRS to reproject exported geometries to
77+
@param driverName OGR driver to use
78+
@param onlySelected write only selected features of layer
79+
@param errorMessage pointer to buffer fo error message
80+
@param datasourceOptions list of OGR data source creation options
81+
@param layerOptions list of OGR layer creation options
82+
@param skipAttributeCreation only write geometries
83+
@param newFilename QString pointer which will contain the new file name created
84+
(in case it is different to fileName).
85+
*/
8686
static WriterError writeAsVectorFormat( QgsVectorLayer* layer,
8787
const QString& fileName,
8888
const QString& fileEncoding,

src/gui/qgsattributeeditor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ QWidget *QgsAttributeEditor::createAttributeEditor( QWidget *parent, QWidget *ed
508508
QMap<int, QWidget*>::const_iterator it = proxyWidgets.find( idx );
509509
if ( it != proxyWidgets.end() )
510510
{
511-
QObject* obj = qvariant_cast<QObject*>( (*it)->property( "QgisAttrEditProxy" ) );
511+
QObject* obj = qvariant_cast<QObject*>(( *it )->property( "QgisAttrEditProxy" ) );
512512
relay = qobject_cast<QgsStringRelay*>( obj );
513513
}
514514
else

src/gui/qgsattributeeditor.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,21 @@ class GUI_EXPORT QgsAttributeEditor : public QObject
8282

8383
class QgsStringRelay : public QObject
8484
{
85-
Q_OBJECT
85+
Q_OBJECT
8686

87-
public:
87+
public:
8888

89-
QgsStringRelay( QObject* parent = NULL )
90-
: QObject( parent ) {}
89+
QgsStringRelay( QObject* parent = NULL )
90+
: QObject( parent ) {}
9191

92-
public slots:
93-
void changeText( QString str )
94-
{
95-
emit textChanged( str );
96-
}
92+
public slots:
93+
void changeText( QString str )
94+
{
95+
emit textChanged( str );
96+
}
9797

98-
signals:
99-
void textChanged( QString );
98+
signals:
99+
void textChanged( QString );
100100
};
101101

102102
#endif

src/gui/qgscharacterselectdialog.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020

2121
QgsCharacterSelectorDialog::QgsCharacterSelectorDialog( QWidget *parent, Qt::WFlags fl )
22-
: QDialog( parent, fl ), mChar( QChar::Null )
22+
: QDialog( parent, fl ), mChar( QChar::Null )
2323
{
2424
setupUi( this );
2525
mCharWidget = new CharacterWidget( this );

0 commit comments

Comments
 (0)