indentation update

This commit is contained in:
Juergen E. Fischer 2012-01-14 16:58:04 +01:00
parent 96b5592c50
commit 50cdcc36ff
15 changed files with 48 additions and 40 deletions

View File

@ -8,7 +8,7 @@ export elcr="$(tput el)$(tput cr)"
find src -type f -print | while read f; do
case "$f" in
src/app/gps/qwtpolar-*|src/core/spatialite/*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/pyspatialite/*|src/providers/sqlanywhere/sqlanyconnection/*)
src/app/gps/qwtpolar-*|src/app/qtmain_android.cpp|src/core/spatialite/*|src/core/spatialindex/src/*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/pyspatialite/*|src/providers/sqlanywhere/sqlanyconnection/*)
echo $f skipped
continue
;;
@ -22,7 +22,7 @@ find src -type f -print | while read f; do
;;
*)
echo $f skipped
echo -ne "$f skipped $elcr"
continue
;;
esac

View File

@ -18,8 +18,10 @@
#include "qgshillshadefilter.h"
QgsHillshadeFilter::QgsHillshadeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, double lightAzimuth,
double lightAngle): \
QgsDerivativeFilter( inputFile, outputFile, outputFormat ), mLightAzimuth( lightAzimuth ), mLightAngle( lightAngle )
double lightAngle )
: QgsDerivativeFilter( inputFile, outputFile, outputFormat )
, mLightAzimuth( lightAzimuth )
, mLightAngle( lightAngle )
{
}
@ -27,8 +29,9 @@ QgsHillshadeFilter::~QgsHillshadeFilter()
{
}
float QgsHillshadeFilter::processNineCellWindow( float* x11, float* x21, float* x31, \
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 )
float QgsHillshadeFilter::processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32,
float* x13, float* x23, float* x33 )
{
float derX = calcFirstDerX( x11, x21, x31, x12, x22, x32, x13, x23, x33 );
float derY = calcFirstDerY( x11, x21, x31, x12, x22, x32, x13, x23, x33 );
@ -42,7 +45,7 @@ float QgsHillshadeFilter::processNineCellWindow( float* x11, float* x21, float*
float slope_rad = atan( sqrt( derX * derX + derY * derY ) );
float azimuth_rad = mLightAzimuth * M_PI / 180.0;
float aspect_rad = 0;
if( derX == 0 && derY == 0 ) //aspect undefined, take a neutral value. Better solutions?
if ( derX == 0 && derY == 0 ) //aspect undefined, take a neutral value. Better solutions?
{
aspect_rad = azimuth_rad / 2.0;
}
@ -50,5 +53,5 @@ float QgsHillshadeFilter::processNineCellWindow( float* x11, float* x21, float*
{
aspect_rad = M_PI + atan2( derX, derY );
}
return qMax( 0.0, 255.0 * ( ( cos( zenith_rad ) * cos( slope_rad ) ) + ( sin( zenith_rad ) * sin( slope_rad ) * cos( azimuth_rad - aspect_rad ) ) ) );
return qMax( 0.0, 255.0 * (( cos( zenith_rad ) * cos( slope_rad ) ) + ( sin( zenith_rad ) * sin( slope_rad ) * cos( azimuth_rad - aspect_rad ) ) ) );
}

View File

@ -24,18 +24,19 @@ class ANALYSIS_EXPORT QgsHillshadeFilter: public QgsDerivativeFilter
{
public:
QgsHillshadeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, double lightAzimuth = 300,
double lightAngle = 40 );
double lightAngle = 40 );
~QgsHillshadeFilter();
/**Calculates output value from nine input values. The input values and the output value can be equal to the \
/**Calculates output value from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*/
float processNineCellWindow( float* x11, float* x21, float* x31, \
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 );
float processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32,
float* x13, float* x23, float* x33 );
float lightAzimuth() const { return mLightAzimuth; }
void setLightAzimuth( float azimuth ){ mLightAzimuth = azimuth; }
void setLightAzimuth( float azimuth ) { mLightAzimuth = azimuth; }
float lightAngle() const { return mLightAngle; }
void setLightAngle( float angle ){ mLightAngle = angle; }
void setLightAngle( float angle ) { mLightAngle = angle; }
private:
float mLightAzimuth;

View File

@ -2,7 +2,7 @@
qgsrelief.cpp - description
---------------------------
begin : November 2011
copyright : (C) 20011 by Marco Hugentobler
copyright : (C) 2011 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************/

View File

@ -2,7 +2,7 @@
qgsrelief.h - description
---------------------------
begin : November 2011
copyright : (C) 20011 by Marco Hugentobler
copyright : (C) 2011 by Marco Hugentobler
email : marco dot hugentobler at sourcepole dot ch
***************************************************************************/

View File

@ -55,7 +55,7 @@ QgsMapToolCapture::~QgsMapToolCapture()
stopCapturing();
if( mValidator )
if ( mValidator )
{
mValidator->deleteLater();
mValidator = 0;
@ -283,7 +283,7 @@ void QgsMapToolCapture::validateGeometry()
if ( settings.value( "/qgis/digitizing/validate_geometries", 1 ).toInt() == 0 )
return;
if( mValidator )
if ( mValidator )
{
mValidator->deleteLater();
mValidator = 0;
@ -311,7 +311,7 @@ void QgsMapToolCapture::validateGeometry()
case CapturePolygon:
if ( mCaptureList.size() < 3 )
return;
g = QgsGeometry::fromPolygon( QgsPolygon() << ( QgsPolyline () << mCaptureList.toVector() << mCaptureList[0] ) );
g = QgsGeometry::fromPolygon( QgsPolygon() << ( QgsPolyline() << mCaptureList.toVector() << mCaptureList[0] ) );
break;
}

View File

@ -202,7 +202,7 @@ QString QgsAttributeAction::expandAction( QString action, QgsFeature &feat, cons
int start = index;
index = pos + rx.matchedLength();
QString to_replace = rx.cap(1).trimmed();
QString to_replace = rx.cap( 1 ).trimmed();
QgsDebugMsg( "Found expression:" + to_replace );
if ( substitutionMap && substitutionMap->contains( to_replace ) )

View File

@ -188,7 +188,7 @@ class CORE_EXPORT QgsAttributeAction
static void ( *smPythonExecute )( const QString & );
void runAction( const QgsAction &action,
void ( *executePython )( const QString & ) = 0 );
void ( *executePython )( const QString & ) = 0 );
int mDefaultAction;
};

View File

@ -138,7 +138,7 @@ static double getDoubleValue( const QVariant& value, QgsExpression* parent )
static int getIntValue( const QVariant& value, QgsExpression* parent )
{
bool ok;
qint64 x = value.toLongLong(&ok);
qint64 x = value.toLongLong( &ok );
if ( ok && x >= std::numeric_limits<int>::min() && x <= std::numeric_limits<int>::max() )
{
return x;

View File

@ -40,12 +40,12 @@ typedef QgsVectorLayerImport::ImportError createEmptyLayer_t(
QgsVectorLayerImport::QgsVectorLayerImport( const QString &uri,
const QString &providerKey,
const QgsFieldMap& fields,
QGis::WkbType geometryType,
const QgsCoordinateReferenceSystem* crs,
bool overwrite,
const QMap<QString, QVariant> *options )
const QString &providerKey,
const QgsFieldMap& fields,
QGis::WkbType geometryType,
const QgsCoordinateReferenceSystem* crs,
bool overwrite,
const QMap<QString, QVariant> *options )
: mErrorCount( 0 )
{
mProvider = NULL;

View File

@ -43,9 +43,9 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent )
expressionTree->setContextMenuPolicy( Qt::CustomContextMenu );
connect( expressionTree, SIGNAL( customContextMenuRequested( const QPoint & ) ), this, SLOT( showContextMenu( const QPoint & ) ) );
foreach (QPushButton* button, this->mOperatorsGroupBox->findChildren<QPushButton *>())
foreach( QPushButton* button, this->mOperatorsGroupBox->findChildren<QPushButton *>() )
{
connect( button, SIGNAL( pressed() ), this, SLOT( operatorButtonClicked() ) );
connect( button, SIGNAL( pressed() ), this, SLOT( operatorButtonClicked() ) );
}
// TODO Can we move this stuff to QgsExpression, like the functions?
@ -155,7 +155,7 @@ void QgsExpressionBuilderWidget::loadFieldNames()
void QgsExpressionBuilderWidget::loadFieldNames( QgsFieldMap fields )
{
if ( fields.isEmpty() )
return;
return;
QStringList fieldNames;
foreach( QgsField field, fields )

View File

@ -857,10 +857,10 @@ void QgsProjectionSelector::on_cbxHideDeprecated_stateChanged()
hideDeprecated( lstCoordinateSystems->topLevelItem( i ) );
}
void QgsProjectionSelector::on_lstRecent_itemClicked(QTreeWidgetItem * item)
void QgsProjectionSelector::on_lstRecent_itemClicked( QTreeWidgetItem * item )
{
setSelectedCrsId( item->text( QGIS_CRS_ID_COLUMN ).toLong() );
item->setSelected(true);
item->setSelected( true );
}
void QgsProjectionSelector::on_leSearch_textChanged( const QString & theFilterTxt )

View File

@ -113,7 +113,7 @@ class GUI_EXPORT QgsProjectionSelector: public QWidget, private Ui::QgsProjectio
* \warning This function's behaviour is undefined if it is called after the widget is shown.
*/
void setOgcWmsCrsFilter( QSet<QString> crsFilter );
void on_lstRecent_itemClicked(QTreeWidgetItem * );
void on_lstRecent_itemClicked( QTreeWidgetItem * );
void on_cbxHideDeprecated_stateChanged();
void on_leSearch_textChanged( const QString & );

View File

@ -57,7 +57,7 @@ void QgsScaleComboBox::showPopup()
parts = itemText( i ).split( ':' );
nextScale = parts.at( 1 ).toLong( &ok );
delta = qAbs( currScale - nextScale );
if( delta < min )
if ( delta < min )
{
min = delta;
idx = i;

View File

@ -89,14 +89,15 @@ void QgsGPSPluginGui::on_buttonBox_accepted()
// what should we do?
switch ( tabWidget->currentIndex() )
{
// add a GPX layer?
case 0:
// add a GPX layer?
emit loadGPXFile( leGPXFile->text(), cbGPXWaypoints->isChecked(),
cbGPXRoutes->isChecked(), cbGPXTracks->isChecked() );
break;
// or import other file?
case 1:
{
// or import other file?
const QString& typeString( cmbIMPFeature->currentText() );
emit importGPSFile( leIMPInput->text(),
mImporters.find( mImpFormat )->second,
@ -107,9 +108,10 @@ void QgsGPSPluginGui::on_buttonBox_accepted()
leIMPLayer->text() );
break;
}
// or download GPS data from a device?
case 2:
{
// or download GPS data from a device?
int featureType = cmbDLFeatureType->currentIndex();
QString fileName = leDLOutput->text();
@ -124,17 +126,19 @@ void QgsGPSPluginGui::on_buttonBox_accepted()
fileName, leDLBasename->text() );
break;
}
// or upload GPS data to a device?
case 3:
{
// or upload GPS data to a device?
emit uploadToGPS( mGPXLayers[cmbULLayer->currentIndex()],
cmbULDevice->currentText(),
cmbULPort->itemData( cmbULPort->currentIndex() ).toString() );
break;
}
// or convert between waypoints/tracks=
case 4:
{
// or convert between waypoints/tracks=
int convertType = cmbCONVType->itemData( cmbCONVType->currentIndex() ).toInt();
emit convertGPSFile( leCONVInput->text(),