mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
indentation update
This commit is contained in:
parent
96b5592c50
commit
50cdcc36ff
@ -8,7 +8,7 @@ export elcr="$(tput el)$(tput cr)"
|
|||||||
|
|
||||||
find src -type f -print | while read f; do
|
find src -type f -print | while read f; do
|
||||||
case "$f" in
|
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
|
echo $f skipped
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
@ -22,7 +22,7 @@ find src -type f -print | while read f; do
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo $f skipped
|
echo -ne "$f skipped $elcr"
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -18,8 +18,10 @@
|
|||||||
#include "qgshillshadefilter.h"
|
#include "qgshillshadefilter.h"
|
||||||
|
|
||||||
QgsHillshadeFilter::QgsHillshadeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, double lightAzimuth,
|
QgsHillshadeFilter::QgsHillshadeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, double lightAzimuth,
|
||||||
double lightAngle): \
|
double lightAngle )
|
||||||
QgsDerivativeFilter( inputFile, outputFile, outputFormat ), mLightAzimuth( lightAzimuth ), mLightAngle( 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 QgsHillshadeFilter::processNineCellWindow( float* x11, float* x21, float* x31,
|
||||||
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 )
|
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 derX = calcFirstDerX( x11, x21, x31, x12, x22, x32, x13, x23, x33 );
|
||||||
float derY = calcFirstDerY( 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 slope_rad = atan( sqrt( derX * derX + derY * derY ) );
|
||||||
float azimuth_rad = mLightAzimuth * M_PI / 180.0;
|
float azimuth_rad = mLightAzimuth * M_PI / 180.0;
|
||||||
float aspect_rad = 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;
|
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 );
|
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 ) ) ) );
|
||||||
}
|
}
|
||||||
|
@ -27,15 +27,16 @@ class ANALYSIS_EXPORT QgsHillshadeFilter: public QgsDerivativeFilter
|
|||||||
double lightAngle = 40 );
|
double lightAngle = 40 );
|
||||||
~QgsHillshadeFilter();
|
~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*/
|
nodata value if not present or outside of the border. Must be implemented by subclasses*/
|
||||||
float processNineCellWindow( float* x11, float* x21, float* x31, \
|
float processNineCellWindow( float* x11, float* x21, float* x31,
|
||||||
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 );
|
float* x12, float* x22, float* x32,
|
||||||
|
float* x13, float* x23, float* x33 );
|
||||||
|
|
||||||
float lightAzimuth() const { return mLightAzimuth; }
|
float lightAzimuth() const { return mLightAzimuth; }
|
||||||
void setLightAzimuth( float azimuth ){ mLightAzimuth = azimuth; }
|
void setLightAzimuth( float azimuth ) { mLightAzimuth = azimuth; }
|
||||||
float lightAngle() const { return mLightAngle; }
|
float lightAngle() const { return mLightAngle; }
|
||||||
void setLightAngle( float angle ){ mLightAngle = angle; }
|
void setLightAngle( float angle ) { mLightAngle = angle; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float mLightAzimuth;
|
float mLightAzimuth;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
qgsrelief.cpp - description
|
qgsrelief.cpp - description
|
||||||
---------------------------
|
---------------------------
|
||||||
begin : November 2011
|
begin : November 2011
|
||||||
copyright : (C) 20011 by Marco Hugentobler
|
copyright : (C) 2011 by Marco Hugentobler
|
||||||
email : marco dot hugentobler at sourcepole dot ch
|
email : marco dot hugentobler at sourcepole dot ch
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
qgsrelief.h - description
|
qgsrelief.h - description
|
||||||
---------------------------
|
---------------------------
|
||||||
begin : November 2011
|
begin : November 2011
|
||||||
copyright : (C) 20011 by Marco Hugentobler
|
copyright : (C) 2011 by Marco Hugentobler
|
||||||
email : marco dot hugentobler at sourcepole dot ch
|
email : marco dot hugentobler at sourcepole dot ch
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ QgsMapToolCapture::~QgsMapToolCapture()
|
|||||||
|
|
||||||
stopCapturing();
|
stopCapturing();
|
||||||
|
|
||||||
if( mValidator )
|
if ( mValidator )
|
||||||
{
|
{
|
||||||
mValidator->deleteLater();
|
mValidator->deleteLater();
|
||||||
mValidator = 0;
|
mValidator = 0;
|
||||||
@ -283,7 +283,7 @@ void QgsMapToolCapture::validateGeometry()
|
|||||||
if ( settings.value( "/qgis/digitizing/validate_geometries", 1 ).toInt() == 0 )
|
if ( settings.value( "/qgis/digitizing/validate_geometries", 1 ).toInt() == 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( mValidator )
|
if ( mValidator )
|
||||||
{
|
{
|
||||||
mValidator->deleteLater();
|
mValidator->deleteLater();
|
||||||
mValidator = 0;
|
mValidator = 0;
|
||||||
@ -311,7 +311,7 @@ void QgsMapToolCapture::validateGeometry()
|
|||||||
case CapturePolygon:
|
case CapturePolygon:
|
||||||
if ( mCaptureList.size() < 3 )
|
if ( mCaptureList.size() < 3 )
|
||||||
return;
|
return;
|
||||||
g = QgsGeometry::fromPolygon( QgsPolygon() << ( QgsPolyline () << mCaptureList.toVector() << mCaptureList[0] ) );
|
g = QgsGeometry::fromPolygon( QgsPolygon() << ( QgsPolyline() << mCaptureList.toVector() << mCaptureList[0] ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ QString QgsAttributeAction::expandAction( QString action, QgsFeature &feat, cons
|
|||||||
int start = index;
|
int start = index;
|
||||||
index = pos + rx.matchedLength();
|
index = pos + rx.matchedLength();
|
||||||
|
|
||||||
QString to_replace = rx.cap(1).trimmed();
|
QString to_replace = rx.cap( 1 ).trimmed();
|
||||||
QgsDebugMsg( "Found expression:" + to_replace );
|
QgsDebugMsg( "Found expression:" + to_replace );
|
||||||
|
|
||||||
if ( substitutionMap && substitutionMap->contains( to_replace ) )
|
if ( substitutionMap && substitutionMap->contains( to_replace ) )
|
||||||
|
@ -138,7 +138,7 @@ static double getDoubleValue( const QVariant& value, QgsExpression* parent )
|
|||||||
static int getIntValue( const QVariant& value, QgsExpression* parent )
|
static int getIntValue( const QVariant& value, QgsExpression* parent )
|
||||||
{
|
{
|
||||||
bool ok;
|
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() )
|
if ( ok && x >= std::numeric_limits<int>::min() && x <= std::numeric_limits<int>::max() )
|
||||||
{
|
{
|
||||||
return x;
|
return x;
|
||||||
|
@ -43,7 +43,7 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent )
|
|||||||
expressionTree->setContextMenuPolicy( Qt::CustomContextMenu );
|
expressionTree->setContextMenuPolicy( Qt::CustomContextMenu );
|
||||||
connect( expressionTree, SIGNAL( customContextMenuRequested( const QPoint & ) ), this, SLOT( showContextMenu( const QPoint & ) ) );
|
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() ) );
|
||||||
}
|
}
|
||||||
|
@ -857,10 +857,10 @@ void QgsProjectionSelector::on_cbxHideDeprecated_stateChanged()
|
|||||||
hideDeprecated( lstCoordinateSystems->topLevelItem( i ) );
|
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() );
|
setSelectedCrsId( item->text( QGIS_CRS_ID_COLUMN ).toLong() );
|
||||||
item->setSelected(true);
|
item->setSelected( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsProjectionSelector::on_leSearch_textChanged( const QString & theFilterTxt )
|
void QgsProjectionSelector::on_leSearch_textChanged( const QString & theFilterTxt )
|
||||||
|
@ -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.
|
* \warning This function's behaviour is undefined if it is called after the widget is shown.
|
||||||
*/
|
*/
|
||||||
void setOgcWmsCrsFilter( QSet<QString> crsFilter );
|
void setOgcWmsCrsFilter( QSet<QString> crsFilter );
|
||||||
void on_lstRecent_itemClicked(QTreeWidgetItem * );
|
void on_lstRecent_itemClicked( QTreeWidgetItem * );
|
||||||
void on_cbxHideDeprecated_stateChanged();
|
void on_cbxHideDeprecated_stateChanged();
|
||||||
void on_leSearch_textChanged( const QString & );
|
void on_leSearch_textChanged( const QString & );
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ void QgsScaleComboBox::showPopup()
|
|||||||
parts = itemText( i ).split( ':' );
|
parts = itemText( i ).split( ':' );
|
||||||
nextScale = parts.at( 1 ).toLong( &ok );
|
nextScale = parts.at( 1 ).toLong( &ok );
|
||||||
delta = qAbs( currScale - nextScale );
|
delta = qAbs( currScale - nextScale );
|
||||||
if( delta < min )
|
if ( delta < min )
|
||||||
{
|
{
|
||||||
min = delta;
|
min = delta;
|
||||||
idx = i;
|
idx = i;
|
||||||
|
@ -89,14 +89,15 @@ void QgsGPSPluginGui::on_buttonBox_accepted()
|
|||||||
// what should we do?
|
// what should we do?
|
||||||
switch ( tabWidget->currentIndex() )
|
switch ( tabWidget->currentIndex() )
|
||||||
{
|
{
|
||||||
// add a GPX layer?
|
|
||||||
case 0:
|
case 0:
|
||||||
|
// add a GPX layer?
|
||||||
emit loadGPXFile( leGPXFile->text(), cbGPXWaypoints->isChecked(),
|
emit loadGPXFile( leGPXFile->text(), cbGPXWaypoints->isChecked(),
|
||||||
cbGPXRoutes->isChecked(), cbGPXTracks->isChecked() );
|
cbGPXRoutes->isChecked(), cbGPXTracks->isChecked() );
|
||||||
break;
|
break;
|
||||||
// or import other file?
|
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
|
// or import other file?
|
||||||
const QString& typeString( cmbIMPFeature->currentText() );
|
const QString& typeString( cmbIMPFeature->currentText() );
|
||||||
emit importGPSFile( leIMPInput->text(),
|
emit importGPSFile( leIMPInput->text(),
|
||||||
mImporters.find( mImpFormat )->second,
|
mImporters.find( mImpFormat )->second,
|
||||||
@ -107,9 +108,10 @@ void QgsGPSPluginGui::on_buttonBox_accepted()
|
|||||||
leIMPLayer->text() );
|
leIMPLayer->text() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// or download GPS data from a device?
|
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
|
// or download GPS data from a device?
|
||||||
int featureType = cmbDLFeatureType->currentIndex();
|
int featureType = cmbDLFeatureType->currentIndex();
|
||||||
|
|
||||||
QString fileName = leDLOutput->text();
|
QString fileName = leDLOutput->text();
|
||||||
@ -124,17 +126,19 @@ void QgsGPSPluginGui::on_buttonBox_accepted()
|
|||||||
fileName, leDLBasename->text() );
|
fileName, leDLBasename->text() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// or upload GPS data to a device?
|
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
|
// or upload GPS data to a device?
|
||||||
emit uploadToGPS( mGPXLayers[cmbULLayer->currentIndex()],
|
emit uploadToGPS( mGPXLayers[cmbULLayer->currentIndex()],
|
||||||
cmbULDevice->currentText(),
|
cmbULDevice->currentText(),
|
||||||
cmbULPort->itemData( cmbULPort->currentIndex() ).toString() );
|
cmbULPort->itemData( cmbULPort->currentIndex() ).toString() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// or convert between waypoints/tracks=
|
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
|
// or convert between waypoints/tracks=
|
||||||
int convertType = cmbCONVType->itemData( cmbCONVType->currentIndex() ).toInt();
|
int convertType = cmbCONVType->itemData( cmbCONVType->currentIndex() ).toInt();
|
||||||
|
|
||||||
emit convertGPSFile( leCONVInput->text(),
|
emit convertGPSFile( leCONVInput->text(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user